src/system/helpers.cpp:-add file_size function

Signed-off-by: Jacek Jendrzej <crashdvb@googlemail.com>


Origin commit data
------------------
Branch: ni/coolstream
Commit: 947a277a49
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2013-04-24 (Wed, 24 Apr 2013)



------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2013-04-24 13:22:59 +02:00
parent 5061445fca
commit 33d2b15a90
2 changed files with 13 additions and 0 deletions

View File

@@ -42,6 +42,18 @@
#include <system/helpers.h>
#include <gui/update_ext.h>
off_t file_size(const char *filename)
{
struct stat stat_buf;
if(::stat(filename, &stat_buf) == 0)
{
return stat_buf.st_size;
} else
{
return 0;
}
}
bool file_exists(const char *filename)
{
struct stat stat_buf;