Visit Mozilla.org

nsIFile:fileSize

From MDC

« XPCOM API Reference

[edit] Summary

This attribute exposes the size of the file referenced by this nsIFile.

 attribute PRInt64 fileSize;

[edit] Remarks

The value of this attribute is the number of bytes corresponding to the data represented by the file. Any meta data, such as a resource fork on the Mac, is not included in the measurement of the file size.

Changing the size of a nsIFile operates on the underlying filesystem, possibly truncating the existing file to specified size.

[edit] See Also

nsIFile