Mac OSX

Implemented by


  
[scriptable, uuid(86d685e5-ee3f-405a-b521-446529db82e5)]
interface nsILocalFileMac : nsILocalFile

Constants

 Use with SetFileType() to specify the signature of current process
const unsigned long CURRENT_PROCESS_CREATOR = 134217728

Attributes

 bundleDisplayName

 returns the display name of the application bundle (usually the human 
 readable name of the application)
readonly attribute AString bundleDisplayName
 bundleIdentifier

 returns the identifier of the bundle
readonly attribute AUTF8String bundleIdentifier

        
[noscript] 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

[noscript] 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
  
[noscript] 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
  
[noscript] 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
  
[noscript] 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

[noscript] 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

[noscript] 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 FSRef

[noscript] void initWithFSRef([const] in FSRefPtr aFSRef)
 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)