Subclasses

Attributes

From nsICrashReporter

 Get or set the path on the local system to which minidumps will be
 written when a crash happens.

 @throw NS_ERROR_NOT_INITIALIZED if crash reporting is not initialized
attribute nsILocalFile minidumpPath

From nsIDownload

 The target of a download is always a file on the local file system.
readonly attribute nsILocalFile targetFile

From nsIDownloadManager

 Returns the platform default downloads directory.
readonly attribute nsILocalFile defaultDownloadsDirectory
 Returns the user configured downloads directory. 
 The path is dependent on two user configurable prefs
 set in preferences:

 browser.download.folderList
   Indicates the location users wish to save downloaded 
   files too.  
   Values: 
     0 - The desktop is the default download location. 
     1 - The system's downloads folder is the default download location. 
     2 - The default download location is elsewhere as specified in  
         browser.download.dir. If invalid, userDownloadsDirectory
         will fallback on defaultDownloadsDirectory.

 browser.download.dir - 
   A local path the user may have selected at some point 
   where downloaded files are saved. The use of which is
   enabled when folderList equals 2. 
readonly attribute nsILocalFile userDownloadsDirectory

From nsIFilePicker

 Set the directory that the file open/save dialog initially displays

 @param      displayDirectory  the name of the directory

attribute nsILocalFile displayDirectory
 Get the nsILocalFile for the file or directory.

 @return Returns the file currently selected
readonly attribute nsILocalFile file

From nsIProfileLock

 The main profile directory.
readonly attribute nsILocalFile directory
 A directory corresponding to the main profile directory that exists for
 the purpose of storing data on the local filesystem, including cache
 files or other data files that may not represent critical user data.
 (e.g., this directory may not be included as part of a backup scheme.)

 In some cases, this directory may just be the main profile directory.
readonly attribute nsILocalFile localDirectory

From nsIRelativeFilePref

 file

 The file whose location is stored or retrieved.
attribute nsILocalFile file

From nsIShellService

 The default system handler for web feeds
readonly attribute nsILocalFile defaultFeedReader

From nsIToolkitProfile

 The location of the profile local directory, which may be the same as
 the root directory.  See nsIProfileLock::localDirectory.
readonly attribute nsILocalFile localDir
 A interface representing a profile.
 @note THIS INTERFACE SHOULD BE IMPLEMENTED BY THE TOOLKIT CODE ONLY! DON'T
       EVEN THINK ABOUT IMPLEMENTING THIS IN JAVASCRIPT!


 The location of the profile directory.
readonly attribute nsILocalFile rootDir

Returns

From nsIHelperAppLauncherDialog

 Invoke a save-to-file dialog instead of the full fledged helper app dialog.
 Returns the a nsILocalFile for the file name/location selected.

 @param aLauncher
        A nsIHelperAppLauncher to be invoked when a file is selected.
 @param aWindowContext
        Window associated with action.
 @param aDefaultFileName
        Default file name to provide (can be null)
 @param aSuggestedFileExtension
        Sugested file extension
 @param aForcePrompt
        Set to true to force prompting the user for thet file
        name/location, otherwise perferences may control if the user is
        prompted.
nsILocalFile promptForSaveToFile(in nsIHelperAppLauncher aLauncher, in nsISupports aWindowContext, in wstring aDefaultFileName, in wstring aSuggestedFileExtension, in boolean aForcePrompt)

From nsIPref


          
nsILocalFile getFileXPref(in string pref)

Parameters

From nsIDownloadManager

 Creates an nsIDownload and adds it to be managed by the download manager.

 @param aSource The source URI of the transfer. Must not be null.

 @param aTarget The target URI of the transfer. Must not be null.

 @param aDisplayName The user-readable description of the transfer.
                     Can be empty.

 @param aMIMEInfo The MIME info associated with the target,
                  including MIME type and helper app when appropriate.
                  This parameter is optional.

 @param startTime Time when the download started

 @param aTempFile The location of a temporary file; i.e. a file in which
                  the received data will be stored, but which is not
                  equal to the target file. (will be moved to the real
                  target by the caller, when the download is finished)
                  May be null.

 @param aCancelable An object that can be used to abort the download.
                    Must not be null.

 @return The newly created download item with the passed-in properties.

 @note This does not actually start a download.  If you want to add and
       start a download, you need to create an nsIWebBrowserPersist, pass it
       as the aCancelable object, call this method, set the progressListener
       as the returned download object, then call saveURI.
nsIDownload addDownload(in short aDownloadType, in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime aStartTime, in nsILocalFile aTempFile, in nsICancelable aCancelable)

From nsIINIParserFactory

 Create an iniparser instance from a local file.
nsIINIParser createINIParser(in nsILocalFile aINIFile)

From nsILocalFile

  initWithFile

  Initialize this object with another file

   @param aFile
       the file this becomes equivalent to
void initWithFile(in nsILocalFile aFile)
  getRelativeDescriptor

  Returns a relative file path in an opaque, XP format. It is therefore
  not a native path.

  The character set of the string returned from this function is
  undefined.  DO NOT TRY TO INTERPRET IT AS HUMAN READABLE TEXT!

   @param fromFile
       the file from which the descriptor is relative.
       There is no defined result if this param is null.
ACString getRelativeDescriptor(in nsILocalFile fromFile)
  setRelativeDescriptor

  Initializes the file to the location relative to fromFile using
  a string returned by getRelativeDescriptor.

   @param fromFile
       the file to which the descriptor is relative
   @param relative
       the relative descriptor obtained from getRelativeDescriptor
void setRelativeDescriptor(in nsILocalFile fromFile, in ACString relativeDesc)

From nsILocalFileMac

 openDocWithApp

 Open the document that this file points to with the given application.

 @param   aAppToOpenWith      The application with  which to open the document.
                              If NULL, the creator code of the document is used
                              to determine the application.
 @param   aLaunchInBackground TRUE if the application should not come to the front.

void openDocWithApp(in nsILocalFile aAppToOpenWith, in boolean aLaunchInBackground)
 launchWithDoc

 Launch the application that this file points to with a document.

 @param   aDocToLoad          Must not be NULL. If no document, use nsILocalFile::launch
 @param   aLaunchInBackground TRUE if the application should not come to the front.

void launchWithDoc(in nsILocalFile aDocToLoad, in boolean aLaunchInBackground)

From nsIModuleLoader

 Return the module for a specified file. The module loader should
 cache the module and return the same module for subsequent
 requests for the same physical file. The module loader is
 responsible for unloading the module during shutdown.

 @throws NS_ERROR_INVALID_ARG If the filename is not recognized.
 @throws NS_ERROR_FACTORY_NOT_LOADED If the filename is recognized but
           the module fails to load, e.g.: missing symbols, syntax errors
nsIModule loadModule(in nsILocalFile aFile)

From nsIPlacesImportExportService

 Saves the current bookmarks hierarchy to a bookmarks.html file.
void exportHTMLToFile(in nsILocalFile aFile)
 Loads the given bookmarks.html file and replaces it with the current
 bookmarks hierarchy (if aIsInitialImport is true) or appends it
 (if aIsInitialImport is false).

 Three nsIObserverService notifications are fired as a result of the
 import.  "bookmarks-restore-begin" is fired just before the import is
 started.  "bookmarks-restore-success" is fired right after the
 bookmarks are successfully imported.  "bookmarks-restore-failed" is
 fired right after a failure occurs when importing the bookmarks.
 Observers will be passed through their data parameters either "html"
 if aIsInitialImport is false or "html-initial" if aIsInitialImport is
 true.  The observer subject will be null.
void importHTMLFromFile(in nsILocalFile aFile, in boolean aIsInitialImport)
 Loads the given bookmarks.html file and puts it in the given folder

 Three nsIObserverService notifications are fired as a result of the
 import.  "bookmarks-restore-begin" is fired just before the import is
 started.  "bookmarks-restore-success" is fired right after the
 bookmarks are successfully imported.  "bookmarks-restore-failed" is
 fired right after a failure occurs when importing the bookmarks.
 Observers will be passed through their data parameters either "html"
 if aIsInitialImport is false or "html-initial" if aIsInitialImport is
 true.  The observer subject will be an nsISupportsPRInt64 whose value
 is aFolder.
void importHTMLFromFileToFolder(in nsILocalFile aFile, in PRInt64 aFolder, in boolean aIsInitialImport)

From nsIPref


          
void setFileXPref(in string pref, in nsILocalFile value)

From nsIShellService

 Opens an application with a specific URI to load.
 @param   application
          The application file (or bundle directory, on OS X)
 @param   uri
          The uri to be loaded by the application
void openApplicationWithURI(in nsILocalFile aApplication, in ACString aURI)

From nsIToolkitProfileService

 Lock an arbitrary path as a profile. If the path does not exist, it
 will be created and the defaults copied from the application directory.
nsIProfileLock lockProfilePath(in nsILocalFile aDirectory, in nsILocalFile aTempDirectory)
 Create a new profile.
 
 @param aRootDir
        The profile directory. May be null, in which case a suitable
        default will be chosen based on the profile name.
 @param aTempDir
        The profile temporary directory. May be null, in which case a
        suitable default will be chosen based either on the profile name
        if aRootDir is null or aRootDir itself.
 @param aName
        The profile name.
nsIToolkitProfile createProfile(in nsILocalFile aRootDir, in nsILocalFile aTempDir, in AUTF8String aName)
 Create a new profile.
 
 @param aRootDir
        The profile directory. May be null, in which case a suitable
        default will be chosen based on the profile name.
 @param aTempDir
        The profile temporary directory. May be null, in which case a
        suitable default will be chosen based either on the profile name
        if aRootDir is null or aRootDir itself.
 @param aName
        The profile name.
nsIToolkitProfile createProfile(in nsILocalFile aRootDir, in nsILocalFile aTempDir, in AUTF8String aName)
 Lock an arbitrary path as a profile. If the path does not exist, it
 will be created and the defaults copied from the application directory.
nsIProfileLock lockProfilePath(in nsILocalFile aDirectory, in nsILocalFile aTempDirectory)

From nsITransfer

 Initializes the transfer with certain properties.  This function must
 be called prior to accessing any properties on this interface.

 @param aSource The source URI of the transfer. Must not be null.

 @param aTarget The target URI of the transfer. Must not be null.

 @param aDisplayName The user-readable description of the transfer.
                     Can be empty.

 @param aMIMEInfo The MIME info associated with the target,
                  including MIME type and helper app when appropriate.
                  This parameter is optional.

 @param startTime Time when the download started (ie, when the first
                  response from the server was received)
                  XXX presumably wbp and exthandler do this differently

 @param aTempFile The location of a temporary file; i.e. a file in which
                  the received data will be stored, but which is not
                  equal to the target file. (will be moved to the real
                  target by the caller, when the download is finished)
                  May be null.

 @param aCancelable An object that can be used to abort the download.
                    Must not be null.
                    Implementations are expected to hold a strong
                    reference to this object until the download is
                    finished, at which point they should release the
                    reference.
void init(in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime startTime, in nsILocalFile aTempFile, in nsICancelable aCancelable)

From nsIX509CertDB

  Export a set of certs and keys from the database to a PKCS#12 file.

  @param aToken Optionally limits the scope of 
                this function to a token device.
                Can be null to mean any token.
  @param aFile Identifies a file that will be filled with the data
               to be exported.
  @param count The number of certificates to be exported.
  @param aCerts The array of all certificates to be exported.
void exportPKCS12File(in nsISupports aToken, in nsILocalFile aFile, in unsigned long count, [array, size_is(count)] in nsIX509Cert aCerts)
  Import certificate(s) from file

  @param aToken Optionally limits the scope of 
                this function to a token device.
                Can be null to mean any token.
  @param aFile Identifies a file that contains the certificate
               to be imported.
  @param aType Describes the type of certificate that is going to
               be imported. See type constants in nsIX509Cert.
void importCertsFromFile(in nsISupports aToken, in nsILocalFile aFile, in unsigned long aType)
  Import a PKCS#12 file containing cert(s) and key(s) into the database.

  @param aToken Optionally limits the scope of 
                this function to a token device.
                Can be null to mean any token.
  @param aFile Identifies a file that contains the data
               to be imported.
void importPKCS12File(in nsISupports aToken, in nsILocalFile aFile)

From nsIXPTLoader

 enumerate entries in the given archive
 for each entry found, the loader will call the sink's
 foundEntry() method with the appropriate information and a
 stream that the consumer can read from
 @param file the file to read from
 @param sink an object which will be called with each file found
             in the file
void enumerateEntries(in nsILocalFile file, in nsIXPTLoaderSink sink)
 Load a specific entry from the archive
 @param file the file to read from
 @param name the name of the xpt within the file
 @return an input stream that will read the raw xpt data from
         the file
nsIInputStream loadEntry(in nsILocalFile file, in string name)