File class that also provides access to the
underlying native NSURL object associated with this File instance.
Objects of this type are returned as a result of invoking the
CommonDialogs.show[File|Folder]Chooser() methods if
the "glass.macosx.enableFileNSURL" system property is true.
| Modifier and Type | Field and Description |
|---|---|
| private long | ptr
A pointer to the NSURL object. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static native MacFileNSURL | |
| private native void | |
| private native byte[] | |
| private static native void | |
| private native boolean | |
| private native void | |
| private void | |
| public static MacFileNSURL | Returns: a new instance of MacFileNSURLReturns an instance of the MacFileNSURL class created from bookmark data stored in the byte array passed as an argument. |
| public static MacFileNSURL | Returns: a new instance of MacFileNSURLReturns an instance of the MacFileNSURL class created from a
document-scoped bookmark data stored in the byte array passed as an
argument, relative to the |
| public void | |
| public byte[] | Returns: bookmark data in a form of byte[]Returns a byte array representing a persistent bookmark for this URL. |
| public byte[] | Returns: bookmark data in a form of byte[]Returns a byte array representing a document-scoped bookmark
for this URL relative to the |
| public boolean | Returns: true if the request to access the resource succeeded; otherwise, falseMakes the resource pointed to by a security-scoped URL available to the app. |
| public void | stopAccessingSecurityScopedResource()
Revokes access to the resource pointed to by a security-scoped URL. |
| ptr | back to summary |
|---|---|
| private long ptr A pointer to the NSURL object. | |
| MacFileNSURL | back to summary |
|---|---|
| private MacFileNSURL(String name, long ptr) | |
| _createFromBookmark | back to summary |
|---|---|
| private static native MacFileNSURL _createFromBookmark(byte[] data, long baseDocumentPtr) | |
| _dispose | back to summary |
|---|---|
| private native void _dispose(long ptr) | |
| _getBookmark | back to summary |
|---|---|
| private native byte[] _getBookmark(long ptr, long baseDocumentPtr) | |
| _initIDs | back to summary |
|---|---|
| private static native void _initIDs() | |
| _startAccessingSecurityScopedResource | back to summary |
|---|---|
| private native boolean _startAccessingSecurityScopedResource(long ptr) | |
| _stopAccessingSecurityScopedResource | back to summary |
|---|---|
| private native void _stopAccessingSecurityScopedResource(long ptr) | |
| checkNotDisposed | back to summary |
|---|---|
| private void checkNotDisposed() | |
| createFromBookmark | back to summary |
|---|---|
| public static MacFileNSURL createFromBookmark(byte[] data) Returns an instance of the MacFileNSURL class created from bookmark
data stored in the byte array passed as an argument.
The glass.macosx.enableFileNSURL system property must be set to
| |
| createFromDocumentScopedBookmark | back to summary |
|---|---|
| public static MacFileNSURL createFromDocumentScopedBookmark(byte[] data, MacFileNSURL baseDocument) Returns an instance of the MacFileNSURL class created from a
document-scoped bookmark data stored in the byte array passed as an
argument, relative to the
| |
| dispose | back to summary |
|---|---|
| public void dispose() Releases the underlying NSURL object. An application must call this method after it no longer needs to use this object in order to release native resources associated with it. | |
| getBookmark | back to summary |
|---|---|
| public byte[] getBookmark() Returns a byte array representing a persistent bookmark for this URL.
An app can store this data, and later re-create the URL with a call
to
| |
| getDocumentScopedBookmark | back to summary |
|---|---|
| public byte[] getDocumentScopedBookmark(MacFileNSURL baseDocument) Returns a byte array representing a document-scoped bookmark
for this URL relative to the
| |
| startAccessingSecurityScopedResource | back to summary |
|---|---|
| public boolean startAccessingSecurityScopedResource() Makes the resource pointed to by a security-scoped URL available to the app.
The call must be balanced with a corresponding call to
| |
| stopAccessingSecurityScopedResource | back to summary |
|---|---|
| public void stopAccessingSecurityScopedResource() Revokes access to the resource pointed to by a security-scoped URL. | |