|
Page Updated: August 31, 2005
Latest Version: 0.1.375 |
|
Debug |
Install | File
I/O |
RDF |
Network |
Sound | Utils |
XUL | Zip
|
|
|
Home | Mailing List |
Install |
Source Code |
Downloads | Bugs
| docs
| clients |
JS FileUtils API
status: stable
Function List
- exists(aPath);
- check to see if a file exists
- chromeToPath(aPath);
- Converts a "chrome://bob/content/" uri to a local file path. *NOTE: although this gives you the path to a file in the chrome directory, you will most likely not have permissions to create or write to files there.
- chromeToURL(aPath);
- Converts a chrome URL to local URL. eg:
chrome://browser/content/ ->
jar:resource:/chrome/browser.jar!/content/browser/browser.xul
- urlToPath(aPath);
- Converts a file:// url to a path eg: file:///usr/local/ ->
/usr/local
- pathToURL(aPath);
- Converts a local path to a file:// path eg: /usr/local/ ->
file:///usr/local
- append(aDirPath, aFileName);
- append is for abstracting platform specific file paths
- remove(aPath);
- remove a file
- create(aPath)
- creates a new file if it doesn't already exist
- copy(aSource, aDest);
- copy a file from source to destination
- leaf(aPath);
- leaf is the endmost file string ex: foo.html in /myDir/foo.html
- permissions(aPath);
- returns the files permissions
- dateModified(aPath);
- returns the last modified date in locale string
- size(aPath);
- returns the file size
- ext(aPath);
- returns a file extension if there is one
- parent(aPath)
- returns the dir part of a path
- run(aPath, aArgs)
- runs another program
- isValidPath(aPath)
- Boolean value if a path is valid. eg: "/tmp" would be false on Windows true on Unix and OSX systems
- nsIFile(aPath)
- returns an nsIFile obj
- help;
- currently dumps a list of available functions