Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

nsLocalFile

« 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

Document Tags and Contributors

 Contributors to this page: fscholz, TechieEddie, Smi, DarinFisher
 Last updated by: fscholz,