nsILocalFileMac
| IID: | 748f3ffe-27d9-4402-9de9-494badbeebf4 |
| Inherits From: | nsILocalFile |
Constants
| Use with SetFileType() to specify the signature of current process | ||
| PRUint32 | CURRENT_PROCESS_CREATOR | = 134217728 |
Properties
readonly AString bundleDisplayName
BundleDisplayName
Returns the display name of the application bundle (usually the human readable name of the application)
readonly AUTF8String bundleIdentifier
BundleIdentifier
Returns the identifier of the bundle
OSType fileCreator
readonly PRInt64 fileSizeWithResFork
FileSizeWithResFork
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()
OSType fileType
FileType, creator
File type and creator attributes
Methods
[noscript] CFURLRef getCFURL ( )
[noscript] FSRef getFSRef ( )
[noscript] FSSpec getFSSpec ( )
[noscript] void initToAppWithCreatorCode ( OSType appCreator )
[noscript] void initWithCFURL ( CFURLRef CFURL )
[noscript] void initWithFSRef ( FSRefPtr* FSRef )
[noscript] void initWithFSSpec ( FSSpecPtr* fileSpec )
PRBool isPackage ( )
void launchWithDoc ( nsILocalFile docToLoad , PRBool launchInBackground )
void openDocWithApp ( nsILocalFile appToOpenWith , PRBool launchInBackground )
void setFileTypeAndCreatorFromExtension ( char* extension )
void setFileTypeAndCreatorFromMIMEType ( char* MIMEType )
Returns the CFURLRef of the file object. The caller is responsible for calling CFRelease() on it.
NOTE: Observes the state of the followLinks attribute. If the file object is an alias and followLinks is TRUE, returns the target of the alias. If followLinks is FALSE, returns the unresolved alias file.
NOTE: Supported only for XP_MACOSX or TARGET_CARBON
Returns the FSRef of the file object.
NOTE: Observes the state of the followLinks attribute. If the file object is an alias and followLinks is TRUE, returns the target of the alias. If followLinks is FALSE, returns the unresolved alias file.
NOTE: Supported only for XP_MACOSX or TARGET_CARBON
Returns the FSSpec of the file object.
NOTE: Observes the state of the followLinks attribute. If the file object is an alias and followLinks is TRUE, returns the target of the alias. If followLinks is FALSE, returns the unresolved alias file.
void initToAppWithCreatorCode ( OSType appCreator )
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.
- Arguments:
- appCreator: the signature of the app
void initWithCFURL ( CFURLRef CFURL )
Init this object with a CFURLRef
NOTE: Supported only for XP_MACOSX or TARGET_CARBON NOTE: If the path of the CFURL is /a/b/c, at least a/b must exist beforehand.
- Arguments:
- CFURL: the CoreFoundation URL
void initWithFSRef ( FSRefPtr* FSRef )
Init this object with an FSRef
NOTE: Supported only for XP_MACOSX or TARGET_CARBON
- Arguments:
- FSRef: the native file spec
void initWithFSSpec ( FSSpecPtr* fileSpec )
Init this object with an FSSpec Legacy method - leaving in place for now
- Arguments:
- fileSpec: the native file spec
void launchWithDoc ( nsILocalFile docToLoad , PRBool launchInBackground )
Launch the application that this file points to with a document.
- Arguments:
- docToLoad: Must not be NULL. If no document, use nsILocalFile::launch
- launchInBackground: TRUE if the application should not come to the front.
void openDocWithApp ( nsILocalFile appToOpenWith , PRBool launchInBackground )
Open the document that this file points to with the given application.
- Arguments:
- appToOpenWith: The application with which to open the document. If NULL, the creator code of the document is used to determine the application.
- launchInBackground: TRUE if the application should not come to the front.
void setFileTypeAndCreatorFromExtension ( char* extension )
Sets the file type and creator code from a file extension Internet Config is used to determine the mapping.
- Arguments:
- extension
void setFileTypeAndCreatorFromMIMEType ( char* MIMEType )
Sets the file type and creator code from a MIME type. Internet Config is used to determine the mapping.
- Arguments:
- MIMEType
Reference documentation is generated from Mozilla's source.
