diff options
Diffstat (limited to 'src/corelib/x11')
-rw-r--r-- | src/corelib/x11/fpg_utils_impl.inc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/x11/fpg_utils_impl.inc b/src/corelib/x11/fpg_utils_impl.inc index d8625b8c..908f411a 100644 --- a/src/corelib/x11/fpg_utils_impl.inc +++ b/src/corelib/x11/fpg_utils_impl.inc @@ -1,7 +1,7 @@ {%mainunit fpg_utils.pas} uses - Unix; + Unix, BaseUnix; // X11 specific filesystem implementations of encoding functions @@ -40,3 +40,11 @@ begin fpSystem(Helper + ' ' + aURL + '&'); end; +function fpgFileSize(const AFilename: TfpgString): integer; +var + st: baseunix.stat; +begin + if not fpstat(pointer(AFilename),st) >= 0 then + exit(-1); + Result := st.st_size; +end; |