User Tools

Site Tools


filesize
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


filesize [2010/06/22 02:59] (current) – created jochen
Line 1: Line 1:
 +====== filesize (reference only) ======
 +<file>  filesize  - return a file's size in bytes
 + 
 +  FORMAT:       fsz = filesize(filename)
 + 
 +  Input fields:
 + 
 +        filename    filename
 + 
 +  Output fields:
 + 
 +        fsz         filesize
 + 
 +  Note: returns NaN if the file doesn't exist</file>
  
 +===== Notes =====
 +This function uses Matlab's internal ''dir'' function instead of reading the file. This means that this number is only valid for files that are not in use when written to. In some cases the filesystem reports an incorrect size (e.g. some operating systems report a size of 0 for files that have not been flushed yet while they are written)!
filesize.txt · Last modified: 2010/06/22 02:59 by jochen