org.rococoa.cocoa.appkit
Class NSFileWrapper

java.lang.Object
  extended by org.rococoa.cocoa.foundation.NSObject
      extended by org.rococoa.cocoa.appkit.NSFileWrapper
All Implemented Interfaces:
NSCoding, NSObject, ObjCObject

public abstract class NSFileWrapper
extends NSObject
implements ObjCObject, NSCoding

This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.


Nested Class Summary
static class NSFileWrapper._class_
           
 
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSCoding
NSCoding._static_
 
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject
NSObject._static_
 
Constructor Summary
NSFileWrapper()
           
 
Method Summary
abstract  NSString addFileWrapper(NSFileWrapper child)
          Add a file wrapper to the receiver's children and return the file name that uniquely identifies it among the receiver's children.
abstract  NSString addRegularFileWithContents_preferredFilename(NSData data, NSString fileName)
          A convenience method.
static NSFileWrapper alloc()
           
 NSDeprecated as_NSFileWrapper_NSDeprecated()
           
static NSFileWrapper createDirectoryWithFileWrappers(NSDictionary childrenByPreferredName)
          Factory method
static NSFileWrapper createRegularFileWithContents(NSData contents)
          Factory method
static NSFileWrapper createSymbolicLinkWithDestinationURL(NSURL url)
          Factory method
static NSFileWrapper createWithSerializedRepresentation(NSData serializeRepresentation)
          Factory method
static NSFileWrapper createWithURL_options_error(NSURL url, NSUInteger options, PointerByReference outError)
          Factory method
abstract  NSDictionary fileAttributes()
          Original signature : -(NSDictionary*)fileAttributes
native declaration : NSFileWrapper.h:102
abstract  NSString filename()
          Original signature : -(NSString*)filename
native declaration : NSFileWrapper.h:97
abstract  NSDictionary fileWrappers()
          Return a dictionary whose values are the receiver's children and whose keys are the unique file name that has been assigned to each one.
static NSFileWrapper._class_ getNSClass()
           
abstract  NSImage icon()
          Original signature : -(NSImage*)icon
native declaration : NSFileWrapper.h:107
abstract  NSFileWrapper initDirectoryWithFileWrappers(NSDictionary childrenByPreferredName)
          A designated initializer for creating an instance for which -isDirectory returns YES.
abstract  NSFileWrapper initRegularFileWithContents(NSData contents)
          A designated initializer for creating an instance for which -isRegularFile returns YES.
abstract  NSFileWrapper initSymbolicLinkWithDestinationURL(NSURL url)
          A designated initializer for creating an instance for which -isSymbolicLink returns YES.
abstract  NSFileWrapper initWithSerializedRepresentation(NSData serializeRepresentation)
          A designated initializer.
abstract  NSFileWrapper initWithURL_options_error(NSURL url, NSUInteger options, PointerByReference outError)
          A designated initializer for creating an instance whose kind (directory, regular file, or symbolic link) is determined based on what the URL locates.
abstract  boolean isDirectory()
          What kind of file wrapper it is.
abstract  boolean isRegularFile()
          Original signature : -(BOOL)isRegularFile
native declaration : NSFileWrapper.h:86
abstract  boolean isSymbolicLink()
          Original signature : -(BOOL)isSymbolicLink
native declaration : NSFileWrapper.h:87
abstract  NSString keyForFileWrapper(NSFileWrapper child)
          Return the unique file name that has been assigned to a child or nil if it is not a child of the receiver.
abstract  boolean matchesContentsOfURL(NSURL url)
          Whether the receiver matches the directory, regular file, or symbolic link that is located by the URL.
static NSFileWrapper new_()
           
abstract  NSString preferredFilename()
          Original signature : -(NSString*)preferredFilename
native declaration : NSFileWrapper.h:92
abstract  boolean readFromURL_options_error(NSURL url, NSUInteger options, PointerByReference outError)
          Recursively reread the entire contents of the receiver from the specified location, and return YES if successful.
abstract  NSData regularFileContents()
          Return the receiver's contents.
abstract  void removeFileWrapper(NSFileWrapper child)
          Remove a file wrapper from the receiver's children.
abstract  NSData serializedRepresentation()
          Return an NSData suitable for passing to -initWithSerializedRepresentation:.
abstract  void setFileAttributes(NSDictionary fileAttributes)
          The file attributes, in a dictionary of the same sort as those returned by -[NSFileManager attributesOfItemAtPath:error:].
abstract  void setFilename(NSString fileName)
          The actual file name.
abstract  void setIcon(NSImage icon)
          The icon.
abstract  void setPreferredFilename(NSString fileName)
          The file name that is "preferred."
abstract  NSURL symbolicLinkDestinationURL()
          Return the destination link of the receiver.
abstract  boolean writeToURL_options_originalContentsURL_error(NSURL url, NSUInteger options, NSURL originalContentsURL, PointerByReference outError)
          Recursively write the entire contents of the receiver at the specified location, and return YES if successful.
 
Methods inherited from class org.rococoa.cocoa.foundation.NSObject
as_NSObject_NSAccessibility, as_NSObject_NSAccessibilityAdditions, as_NSObject_NSApplicationScriptingDelegation, as_NSObject_NSArchiverCallback, as_NSObject_NSClassDescriptionPrimitives, as_NSObject_NSCoderMethods, as_NSObject_NSColorPanelResponderMethod, as_NSObject_NSComparisonMethods, as_NSObject_NSControlSubclassNotifications, as_NSObject_NSCopyLinkMoveHandler, as_NSObject_NSDelayedPerforming, as_NSObject_NSDeprecatedKeyValueCoding, as_NSObject_NSDeprecatedKeyValueObservingCustomization, as_NSObject_NSDeprecatedMethods, as_NSObject_NSDictionaryControllerKeyValuePair, as_NSObject_NSDistributedObjects, as_NSObject_NSDraggingDestination, as_NSObject_NSDraggingSource, as_NSObject_NSDraggingSourceDeprecated, as_NSObject_NSEditor, as_NSObject_NSEditorRegistration, as_NSObject_NSErrorRecoveryAttempting, as_NSObject_NSFileManagerFileOperationAdditions, as_NSObject_NSFontManagerDelegate, as_NSObject_NSFontManagerResponderMethod, as_NSObject_NSFontPanelValidationAdditions, as_NSObject_NSKeyValueBindingCreation, as_NSObject_NSKeyValueCoding, as_NSObject_NSKeyValueObserverNotification, as_NSObject_NSKeyValueObserverRegistration, as_NSObject_NSKeyValueObserving, as_NSObject_NSKeyValueObservingCustomization, as_NSObject_NSMenuValidation, as_NSObject_NSNibAwaking, as_NSObject_NSPasteboardOwner, as_NSObject_NSPlaceholders, as_NSObject_NSScriptClassDescription, as_NSObject_NSScripting, as_NSObject_NSScriptingComparisonMethods, as_NSObject_NSScriptKeyValueCoding, as_NSObject_NSScriptObjectSpecifiers, as_NSObject_NSThreadPerformAdditions, as_NSObject_NSURLClient, as_NSObject_NSURLConnectionDelegate, as_NSObject_NSURLDownloadDelegate, copy, create, dealloc, description, doesNotRecognizeSelector, finalize, forwardingTargetForSelector, forwardInvocation, init, isKindOfClass, isKindOfClass, methodForSelector, methodSignatureForSelector, mutableCopy, release, retain, retainCount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSCoding
encodeWithCoder, initWithCoder
 
Methods inherited from interface org.rococoa.ObjCObject
id
 
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject
autorelease, class_, conformsToProtocol, hash, isEqual, isMemberOfClass, isProxy, performSelector_withObject_withObject, performSelector_withObject, performSelector, respondsToSelector, self, superclass, zone
 

Constructor Detail

NSFileWrapper

public NSFileWrapper()
Method Detail

as_NSFileWrapper_NSDeprecated

public NSDeprecated as_NSFileWrapper_NSDeprecated()

initWithURL_options_error

public abstract NSFileWrapper initWithURL_options_error(NSURL url,
                                                        NSUInteger options,
                                                        PointerByReference outError)
A designated initializer for creating an instance whose kind (directory, regular file, or symbolic link) is determined based on what the URL locates. If reading is not successful return NO after setting *outError to an NSError that encapsulates the reason why the file wrapper could not be read.
Original signature : -(id)initWithURL:(NSURL*) options:(NSFileWrapperReadingOptions) error:(NSError**)
native declaration : NSFileWrapper.h:63


createWithURL_options_error

public static NSFileWrapper createWithURL_options_error(NSURL url,
                                                        NSUInteger options,
                                                        PointerByReference outError)
Factory method

See Also:
initWithURL_options_error(org.rococoa.cocoa.foundation.NSURL, org.rococoa.cocoa.foundation.NSUInteger, com.sun.jna.ptr.PointerByReference)

initDirectoryWithFileWrappers

public abstract NSFileWrapper initDirectoryWithFileWrappers(NSDictionary childrenByPreferredName)
A designated initializer for creating an instance for which -isDirectory returns YES. The passed-in dictionary must contain entries whose values are the file wrappers that are to become children and whose keys are file names. Each file wrapper that does not already have a preferred file name is sent -setPreferredFilename: with the corresponding key as the argument.
Original signature : -(id)initDirectoryWithFileWrappers:(NSDictionary*)
native declaration : NSFileWrapper.h:67


createDirectoryWithFileWrappers

public static NSFileWrapper createDirectoryWithFileWrappers(NSDictionary childrenByPreferredName)
Factory method

See Also:
initDirectoryWithFileWrappers(org.rococoa.cocoa.foundation.NSDictionary)

initRegularFileWithContents

public abstract NSFileWrapper initRegularFileWithContents(NSData contents)
A designated initializer for creating an instance for which -isRegularFile returns YES.
Original signature : -(id)initRegularFileWithContents:(NSData*)
native declaration : NSFileWrapper.h:71


createRegularFileWithContents

public static NSFileWrapper createRegularFileWithContents(NSData contents)
Factory method

See Also:
initRegularFileWithContents(org.rococoa.cocoa.foundation.NSData)

initSymbolicLinkWithDestinationURL

public abstract NSFileWrapper initSymbolicLinkWithDestinationURL(NSURL url)
A designated initializer for creating an instance for which -isSymbolicLink returns YES. -writeToURL:options:originalContentsURL:error: uses the result of sending -relativePath to this URL when creating a symbolic link. (An NSURL initialized by -initFileURLWithPath: returns that entire path when sent -relativePath though.)
Original signature : -(id)initSymbolicLinkWithDestinationURL:(NSURL*)
native declaration : NSFileWrapper.h:75


createSymbolicLinkWithDestinationURL

public static NSFileWrapper createSymbolicLinkWithDestinationURL(NSURL url)
Factory method

See Also:
initSymbolicLinkWithDestinationURL(org.rococoa.cocoa.foundation.NSURL)

initWithSerializedRepresentation

public abstract NSFileWrapper initWithSerializedRepresentation(NSData serializeRepresentation)
A designated initializer. The data must be in the same format as that returned by -serializedRepresentation.
Original signature : -(id)initWithSerializedRepresentation:(NSData*)
native declaration : NSFileWrapper.h:79


createWithSerializedRepresentation

public static NSFileWrapper createWithSerializedRepresentation(NSData serializeRepresentation)
Factory method

See Also:
initWithSerializedRepresentation(org.rococoa.cocoa.foundation.NSData)

isDirectory

public abstract boolean isDirectory()
What kind of file wrapper it is. Invocations of -readFromURL:options:error: may change what subsequent invocations of these methods return.
Original signature : -(BOOL)isDirectory
native declaration : NSFileWrapper.h:85


isRegularFile

public abstract boolean isRegularFile()
Original signature : -(BOOL)isRegularFile
native declaration : NSFileWrapper.h:86


isSymbolicLink

public abstract boolean isSymbolicLink()
Original signature : -(BOOL)isSymbolicLink
native declaration : NSFileWrapper.h:87


setPreferredFilename

public abstract void setPreferredFilename(NSString fileName)
The file name that is "preferred." When the receiver is added to a parent directory file wrapper the parent will attempt to use this name as the key into its dictionary of children. Usually the preferred file name will actually get used in this situation but it won't be if if that key is already in use. The default implementation of this method causes existing parents to remove and re-add the child to accommodate the change. Preferred file names of children are not effectively preserved when you write a file wrapper to disk and then later instantiate another file wrapper by reading. If your application needs to preserve the user-visible names of attachments it has to make its own arrangements for their storage.
Original signature : -(void)setPreferredFilename:(NSString*)
native declaration : NSFileWrapper.h:91


preferredFilename

public abstract NSString preferredFilename()
Original signature : -(NSString*)preferredFilename
native declaration : NSFileWrapper.h:92


setFilename

public abstract void setFilename(NSString fileName)
The actual file name. Often it will be the same as the preferred file name but might instead be a name derived from the preferred file name. You can use this method to find out the name of a child that's just been read but you should not use it to find out the name of a child that's about to be written, because the name might be about to change. Send -keyForFileWrapper: to the parent instead.
Original signature : -(void)setFilename:(NSString*)
native declaration : NSFileWrapper.h:96


filename

public abstract NSString filename()
Original signature : -(NSString*)filename
native declaration : NSFileWrapper.h:97


setFileAttributes

public abstract void setFileAttributes(NSDictionary fileAttributes)
The file attributes, in a dictionary of the same sort as those returned by -[NSFileManager attributesOfItemAtPath:error:].
Original signature : -(void)setFileAttributes:(NSDictionary*)
native declaration : NSFileWrapper.h:101


fileAttributes

public abstract NSDictionary fileAttributes()
Original signature : -(NSDictionary*)fileAttributes
native declaration : NSFileWrapper.h:102


setIcon

public abstract void setIcon(NSImage icon)
The icon. -icon may return nil even if the receiver is the result of reading a parent from the file system (use NSFileWrapperReadingImmediately if appropriate to prevent that). The image that's returned might be shared by many NSFileWrappers so your application must not mutate it. If your application needs to mutate the returned image it should make a copy and mutate the copy instead.
Original signature : -(void)setIcon:(NSImage*)
native declaration : NSFileWrapper.h:106


icon

public abstract NSImage icon()
Original signature : -(NSImage*)icon
native declaration : NSFileWrapper.h:107


matchesContentsOfURL

public abstract boolean matchesContentsOfURL(NSURL url)
Whether the receiver matches the directory, regular file, or symbolic link that is located by the URL. For a directory, children are compared against the files in the directory, recursively. The contents of files are not compared; matching of regular files is based on file modification dates. Because children of directory file wrappers are not read immediately by -initWithURL:options:error: or -readFromURL:options:error: unless NSFileWrapperReadingImmediate is used, creating a file wrapper and then later sending it this message is not a reliable way to simply check whether anything in a directory has changed. You can use this method to determine whether the receiver's contents in memory are out of date relative to the file system.
Original signature : -(BOOL)matchesContentsOfURL:(NSURL*)
native declaration : NSFileWrapper.h:113


readFromURL_options_error

public abstract boolean readFromURL_options_error(NSURL url,
                                                  NSUInteger options,
                                                  PointerByReference outError)
Recursively reread the entire contents of the receiver from the specified location, and return YES if successful. If not successful, return NO after setting *outError to an NSError that encapsulates the reason why the file wrapper could not be reread. When reading a directory children are added and removed as necessary to match the file system.
Original signature : -(BOOL)readFromURL:(NSURL*) options:(NSFileWrapperReadingOptions) error:(NSError**)
native declaration : NSFileWrapper.h:117


writeToURL_options_originalContentsURL_error

public abstract boolean writeToURL_options_originalContentsURL_error(NSURL url,
                                                                     NSUInteger options,
                                                                     NSURL originalContentsURL,
                                                                     PointerByReference outError)
Recursively write the entire contents of the receiver at the specified location, and return YES if successful. If not successful, return NO after setting *outError to an NSError that encapsulates the reason why the file wrapper could not be written. originalContentsURL may be nil or it may be the location of a previous revision of what is being written. If it is not nil the default implementation of this method attempts to avoid unnecessary I/O by merely writing hard links to regular files instead of actually writing out their contents. The descendant file wrappers must return accurate values when sent -filename for this to work (use NSFileWrapperWritingWithNameUpdating to increase the likelihood of that).
Original signature : -(BOOL)writeToURL:(NSURL*) options:(NSFileWrapperWritingOptions) originalContentsURL:(NSURL*) error:(NSError**)
native declaration : NSFileWrapper.h:123


serializedRepresentation

public abstract NSData serializedRepresentation()
Return an NSData suitable for passing to -initWithSerializedRepresentation:. This method may return nil if the receiver is the result of reading from the file system (use NSFileWrapperReadingImmediately if appropriate to prevent that).
Original signature : -(NSData*)serializedRepresentation
native declaration : NSFileWrapper.h:129


addFileWrapper

public abstract NSString addFileWrapper(NSFileWrapper child)
Add a file wrapper to the receiver's children and return the file name that uniquely identifies it among the receiver's children. The unique file name will be the same as the passed-in file wrapper's preferred file name unless that name is already in use as a key into the receiver's dictionary of children.
Original signature : -(NSString*)addFileWrapper:(NSFileWrapper*)
native declaration : NSFileWrapper.h:137


addRegularFileWithContents_preferredFilename

public abstract NSString addRegularFileWithContents_preferredFilename(NSData data,
                                                                      NSString fileName)
A convenience method. The default implementation merely allocates a new file wrapper, initializes it with -initRegularFileWithContents:, sends it -setPreferredFileName:fileName, adds it to the receiver with -addFileWrapper:, and returns what -addFileWrapper: returned.
Original signature : -(NSString*)addRegularFileWithContents:(NSData*) preferredFilename:(NSString*)
native declaration : NSFileWrapper.h:141


removeFileWrapper

public abstract void removeFileWrapper(NSFileWrapper child)
Remove a file wrapper from the receiver's children.
Original signature : -(void)removeFileWrapper:(NSFileWrapper*)
native declaration : NSFileWrapper.h:145


fileWrappers

public abstract NSDictionary fileWrappers()
Return a dictionary whose values are the receiver's children and whose keys are the unique file name that has been assigned to each one. This method may return nil if the receiver is the result of reading a parent from the file system (use NSFileWrapperReadingImmediately if appropriate to prevent that).
Original signature : -(NSDictionary*)fileWrappers
native declaration : NSFileWrapper.h:149


keyForFileWrapper

public abstract NSString keyForFileWrapper(NSFileWrapper child)
Return the unique file name that has been assigned to a child or nil if it is not a child of the receiver.
Original signature : -(NSString*)keyForFileWrapper:(NSFileWrapper*)
native declaration : NSFileWrapper.h:153


regularFileContents

public abstract NSData regularFileContents()
Return the receiver's contents. This may return nil if the receiver is the result of reading a parent from the file system (use NSFileWrapperReadingImmediately if appropriate to prevent that).
Original signature : -(NSData*)regularFileContents
native declaration : NSFileWrapper.h:161


symbolicLinkDestinationURL

public abstract NSURL symbolicLinkDestinationURL()
Return the destination link of the receiver. This may return nil if the receiver is the result of reading a parent from the file system (use NSFileWrapperReadingImmediately if appropriate to prevent that).
Original signature : -(NSURL*)symbolicLinkDestinationURL
native declaration : NSFileWrapper.h:169


alloc

public static NSFileWrapper alloc()

new_

public static NSFileWrapper new_()

getNSClass

public static NSFileWrapper._class_ getNSClass()


Copyright © 2009. All Rights Reserved.