[uuid(614c3010-1dd2-11b2-be04-bcd57a64ffc9)]
interface nsILocalFileMac : nsILocalFile
Constants
Use with SetFileType() to specify the signature of current process
const
unsigned long
CURRENT_PROCESS_CREATOR = 134217728
Attributes
attribute
OSType
fileCreator
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()
readonly attribute
PRInt64
fileSizeWithResFork
fileType, creator File type and creator attributes
attribute
OSType
fileType
Methods
getCFURL 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 @return
CFURLRef
getCFURL()
getFSRef 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 @return
FSRef
getFSRef()
getFSSpec 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. @return
FSSpec
getFSSpec()
initToAppWithCreatorCode 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. @param aAppCreator the signature of the app
void
initToAppWithCreatorCode(in OSType aAppCreator)
initWithCFURL 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. @param aCFURL the CoreFoundation URL
void
initWithCFURL(in CFURLRef aCFURL)
initWithFSRef Init this object with an FSRef NOTE: Supported only for XP_MACOSX or TARGET_CARBON @param aFSRef the native file spec
void
initWithFSRef([const] in FSRefPtr aFSRef)
initWithFSSpec Init this object with an FSSpec Legacy method - leaving in place for now @param aFileSpec the native file spec
void
initWithFSSpec([const] in FSSpecPtr aFileSpec)
isPackage returns true if a directory is determined to be a package under Mac OS 9/X
boolean
isPackage()
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)
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)
setFileTypeAndCreatorFromExtension Sets the file type and creator code from a file extension Internet Config is used to determine the mapping. @param aExtension
void
setFileTypeAndCreatorFromExtension(in string aExtension)
setFileTypeAndCreatorFromMIMEType Sets the file type and creator code from a MIME type. Internet Config is used to determine the mapping. @param aMIMEType
void
setFileTypeAndCreatorFromMIMEType(in string aMIMEType)
Compare to: