Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - findfsize() return the size of a file after a file find http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 findfsize()         Return the size of a file after a file find
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   func long findfsize extern

 Arguments
   None.

 Return
   The size of the file.

 Description
   The findfsize() function returns the file size associated with the file
   found most recently by the findfirst() or findnext() functions.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   func ulong filespace
   param const char cFiles, value uint nType
   // Return the disk space occupied by the specified files
   vardef
      ulong nSize
   enddef
   nSize := 0
   if findfirst( cFiles, nType )
      repeat
         nSize += findfsize()          // add file sizes
      until .not. findnext()
   endif
   return( nSize )
   endfunc
   
   proc Test_findfsize
   ? "Total size of files in current directory is", ;
      numcomma( istr( FileSpace( "*.*", 0x27 ) ) ), "bytes"
   endproc

   proc main
   Test_findfsize()
   endproc

See Also: findfattr() findfdate() findfext() findfstr() findftime()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson