- ecore_file_size

SVN revision: 18916
This commit is contained in:
codewarrior 2005-12-09 00:02:21 +00:00 committed by codewarrior
parent 0e7786ecc4
commit 48e0355efe
2 changed files with 10 additions and 0 deletions

View File

@ -51,6 +51,7 @@ extern "C" {
EAPI int ecore_file_init (void);
EAPI int ecore_file_shutdown (void);
EAPI time_t ecore_file_mod_time (const char *file);
EAPI int ecore_file_size (const char *file);
EAPI int ecore_file_exists (const char *file);
EAPI int ecore_file_is_dir (const char *file);
EAPI int ecore_file_mkdir (const char *dir);

View File

@ -51,6 +51,15 @@ ecore_file_mod_time(const char *file)
return st.st_mtime;
}
int
ecore_file_size(const char *file)
{
struct stat st;
if (stat(file, &st) < 0) return 0;
return st.st_size;
}
int
ecore_file_exists(const char *file)
{