mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
add flac__file_get_filesize()
This commit is contained in:
@@ -42,3 +42,13 @@ void flac__file_copy_metadata(const char *srcpath, const char *destpath)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
off_t flac__file_get_filesize(const char *srcpath)
|
||||
{
|
||||
struct stat srcstat;
|
||||
|
||||
if(0 == stat(srcpath, &srcstat))
|
||||
return srcstat.st_size;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -20,5 +20,6 @@
|
||||
#define flac__file_h
|
||||
|
||||
void flac__file_copy_metadata(const char *srcpath, const char *destpath);
|
||||
off_t flac__file_get_filesize(const char *srcpath);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user