src/macosx/classes/com/apple/eio/FileManager.java

Print this page




  38  * executable. A file type of <code>TEXT</code>  means that the file contains raw text. Any application that can read raw
  39  * text can open a file of type <code>TEXT</code>. Applications that use proprietary file types might assign their files a proprietary
  40  * file <code>type</code> code.
  41  * <p>
  42  * To identify the application that can handle a document, the Finder can look at the <code>creator</code>. For example, if a user
  43  * double-clicks on a document with the <code>ttxt</code> <code>creator</code>, it opens up in Text Edit, the application registered
  44  * with the <code>ttxt</code> <code>creator</code> code. Note that the <code>creator</code>
  45  * code can be set to any application, not necessarily the application that created it. For example, if you
  46  * use an editor to create an HTML document, you might want to assign a browser's <code>creator</code> code for the file rather than
  47  * the HTML editor's <code>creator</code> code. Double-clicking on the document then opens the appropriate browser rather than the
  48  *HTML editor.
  49  *<p>
  50  * If you plan to publicly distribute your application, you must register its creator and any proprietary file types with the Apple
  51  * Developer Connection to avoid collisions with codes used by other developers. You can register a codes online at the
  52  * <a target=_blank href=http://developer.apple.com/dev/cftype/>Creator Code Registration</a> site.
  53  *
  54  * @since 1.4
  55  */
  56 public class FileManager {
  57     static {
  58         java.security.AccessController.doPrivileged((java.security.PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osx"));




  59     }


  60 
  61     /**
  62      * The default
  63      * @since Java for Mac OS X 10.5 - 1.5
  64          * @since Java for Mac OS X 10.5 Update 1 - 1.6
  65      */
  66     public final static short kOnAppropriateDisk = -32767;
  67     /**
  68      * Read-only system hierarchy.
  69      * @since Java for Mac OS X 10.5 - 1.5
  70          * @since Java for Mac OS X 10.5 Update 1 - 1.6
  71      */
  72     public final static short kSystemDomain = -32766;
  73     /**
  74      * All users of a single machine have access to these resources.
  75      * @since Java for Mac OS X 10.5 - 1.5
  76          * @since Java for Mac OS X 10.5 Update 1 - 1.6
  77      */
  78     public final static short kLocalDomain = -32765;
  79     /**




  38  * executable. A file type of <code>TEXT</code>  means that the file contains raw text. Any application that can read raw
  39  * text can open a file of type <code>TEXT</code>. Applications that use proprietary file types might assign their files a proprietary
  40  * file <code>type</code> code.
  41  * <p>
  42  * To identify the application that can handle a document, the Finder can look at the <code>creator</code>. For example, if a user
  43  * double-clicks on a document with the <code>ttxt</code> <code>creator</code>, it opens up in Text Edit, the application registered
  44  * with the <code>ttxt</code> <code>creator</code> code. Note that the <code>creator</code>
  45  * code can be set to any application, not necessarily the application that created it. For example, if you
  46  * use an editor to create an HTML document, you might want to assign a browser's <code>creator</code> code for the file rather than
  47  * the HTML editor's <code>creator</code> code. Double-clicking on the document then opens the appropriate browser rather than the
  48  *HTML editor.
  49  *<p>
  50  * If you plan to publicly distribute your application, you must register its creator and any proprietary file types with the Apple
  51  * Developer Connection to avoid collisions with codes used by other developers. You can register a codes online at the
  52  * <a target=_blank href=http://developer.apple.com/dev/cftype/>Creator Code Registration</a> site.
  53  *
  54  * @since 1.4
  55  */
  56 public class FileManager {
  57     static {
  58         java.security.AccessController.doPrivileged(
  59             new java.security.PrivilegedAction<Void>() {
  60                 public Void run() {
  61                     System.loadLibrary("osx");
  62                     return null;
  63                 }
  64             });
  65     }
  66 
  67     /**
  68      * The default
  69      * @since Java for Mac OS X 10.5 - 1.5
  70          * @since Java for Mac OS X 10.5 Update 1 - 1.6
  71      */
  72     public final static short kOnAppropriateDisk = -32767;
  73     /**
  74      * Read-only system hierarchy.
  75      * @since Java for Mac OS X 10.5 - 1.5
  76          * @since Java for Mac OS X 10.5 Update 1 - 1.6
  77      */
  78     public final static short kSystemDomain = -32766;
  79     /**
  80      * All users of a single machine have access to these resources.
  81      * @since Java for Mac OS X 10.5 - 1.5
  82          * @since Java for Mac OS X 10.5 Update 1 - 1.6
  83      */
  84     public final static short kLocalDomain = -32765;
  85     /**