nsILocalFile
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)CFURLRef getCFURL(); Native code only! |
FSRef getFSRef(); Native code only! |
FSSpec getFSSpec(); Native code only! |
void initToAppWithCreatorCode(in OSType aAppCreator); Native code only! Obsolete since Gecko 2.0 |
void initWithCFURL(in CFURLRef aCFURL); Native code only! |
void initWithFSRef([const] in FSRefPtr aFSRef); Native code only! |
void initWithFSSpec([const] in FSSpecPtr aFileSpec); Native code only! Obsolete since Gecko 1.9.2 |
boolean isPackage(); |
void launchWithDoc(in nsILocalFile aDocToLoad, in boolean aLaunchInBackground); |
void openDocWithApp(in nsILocalFile aAppToOpenWith, in boolean aLaunchInBackground); |
void setFileTypeAndCreatorFromExtension(in string aExtension); Obsolete since Gecko 1.9.2 |
void setFileTypeAndCreatorFromMIMEType(in string aMIMEType); Obsolete since Gecko 1.9.2 |
Attribute | Type | Description |
bundleDisplayName | AString | Returns the display name of the application bundle (usually the human readable name of the application) Read only. |
bundleIdentifier | AUTF8String | Returns the identifier of the bundle. Read only. |
fileCreator | OSType | Native code only! |
fileSizeWithResFork | PRInt64 | Returns the combined size of both the data fork and the resource fork (if present) rather than just the size of the data fork as returned by GetFileSize() Read only. |
fileType | OSType | File type and creator attributes. Native code only! |
Constant | Value | Description |
CURRENT_PROCESS_CREATOR | 0x8000000 | Use with SetFileType() to specify the signature of current process. Obsolete since Gecko 2.0 |
true
, returns the target of the alias. If followLinks is false
, returns the unresolved alias file.CFURLRef getCFURL();
None.
The CFURLRef of the file object. The caller is responsible for calling CFRelease() on it.
true
, returns the target of the alias. If followLinks is false
, returns the unresolved alias file.FSRef getFSRef();
None.
The FSRef of the file object.
true
, returns the target of the alias. If followLinks is false
, returns the unresolved alias file.FSSpec getFSSpec();
None.
The FSSpec of the file object.
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Init this object to point to an application having the given creator code. If this app is missing, this will fail. It will first look for running application with the given creator.
void initToAppWithCreatorCode( in OSType aAppCreator );
aAppCreator
Init this object with a CFURLRef.
void initWithCFURL( in CFURLRef aCFURL );
aCFURL
Init this object with an FSRef.
void initWithFSRef( [const] in FSRefPtr aFSRef );
aFSRef
Obsolete since Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Init this object with an FSSpec Legacy method - leaving in place for now.
void initWithFSSpec( [const] in FSSpecPtr aFileSpec );
aFileSpec
boolean isPackage();
None.
true
if a directory is determined to be a package under Mac OS 9/X.
Launch the application that this file points to with a document.
void launchWithDoc( in nsILocalFile aDocToLoad, in boolean aLaunchInBackground );
aDocToLoad
null
. If no document, use nsILocalFile
::launch.aLaunchInBackground
true
if the application should not come to the front.Open the document that this file points to with the given application.
void openDocWithApp( in nsILocalFile aAppToOpenWith, in boolean aLaunchInBackground );
aAppToOpenWith
null
, the creator code of the document is used to determine the application.aLaunchInBackground
true
if the application should not come to the front.Sets the file type and creator code from a file extension Internet Config is used to determine the mapping.
void setFileTypeAndCreatorFromExtension( in string aExtension );
aExtension
Sets the file type and creator code from a MIME type. Internet Config is used to determine the mapping.
void setFileTypeAndCreatorFromMIMEType( in string aMIMEType );
aMIMEType