« XPCOM API Reference

Summary

A component implementing nsILocalFile.

Class ID
2e23e220-60be-11d3-8c4a-000064657374
ContractID
@mozilla.org/file/local;1

Supported Interfaces

nsILocalFile, nsIFile

Remarks

This component should be accessed via the XPCOM Component Manager.

Example Code

function getFileSize(path) {
  var file =
      Components.classes["@mozilla.org/file/local;1"].
      createInstance(Components.interfaces.nsILocalFile);
  file.initWithPath(path);
  return file.fileSize;
}

See also

Components, nsIComponentManager