org.rococoa.cocoa.foundation
Class NSFileManager

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

public abstract class NSFileManager
extends NSObject
implements ObjCObject

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 NSFileManager._class_
           
 
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject
NSObject._static_
 
Constructor Summary
NSFileManager()
           
 
Method Summary
static NSFileManager alloc()
           
abstract  NSDictionary attributesOfFileSystemForPath_error(NSString path, PointerByReference error)
          attributesOfFileSystemForPath:error: returns an NSDictionary of key/value pairs containing the attributes of the filesystem containing the provided path.
abstract  NSDictionary attributesOfItemAtPath_error(NSString path, PointerByReference error)
          attributesOfItemAtPath:error: returns an NSDictionary of key/value pairs containing the attributes of the item (file, directory, symlink, etc.) at the path in question.
abstract  boolean changeCurrentDirectoryPath(NSString path)
          Original signature : -(BOOL)changeCurrentDirectoryPath:(NSString*)
native declaration : NSFileManager.h:181
abstract  boolean changeFileAttributes_atPath(NSDictionary attributes, NSString path)
          Original signature : -(BOOL)changeFileAttributes:(NSDictionary*) atPath:(NSString*)
native declaration : NSFileManager.h:164
abstract  NSArray componentsToDisplayForPath(NSString path)
          componentsToDisplayForPath: returns an NSArray of display names for the path provided.
abstract  NSData contentsAtPath(NSString path)
          These methods are provided here for compatibility.
abstract  boolean contentsEqualAtPath_andPath(NSString path1, NSString path2)
          -contentsEqualAtPath:andPath: does not take into account data stored in the resource fork or filesystem extended attributes.
abstract  NSArray contentsOfDirectoryAtPath_error(NSString path, PointerByReference error)
          contentsOfDirectoryAtPath:error: returns an NSArray of NSStrings representing the filenames of the items in the directory.
abstract  NSArray contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error(NSURL url, NSArray keys, NSUInteger mask, PointerByReference error)
          -contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error: returns an NSArray of NSURLs identifying the the directory entries.
abstract  boolean copyItemAtPath_toPath_error(NSString srcPath, NSString dstPath, PointerByReference error)
          These methods replace their non-error returning counterparts below.
abstract  boolean copyItemAtURL_toURL_error(NSURL srcURL, NSURL dstURL, PointerByReference error)
          These methods are URL-taking equivalents of the four methods above.
abstract  boolean copyPath_toPath_handler(NSString src, NSString dest, ObjCObject handler)
          Original signature : -(BOOL)copyPath:(NSString*) toPath:(NSString*) handler:(id)
native declaration : NSFileManager.h:173
abstract  boolean createDirectoryAtPath_attributes(NSString path, NSDictionary attributes)
          Original signature : -(BOOL)createDirectoryAtPath:(NSString*) attributes:(NSDictionary*)
native declaration : NSFileManager.h:169
abstract  boolean createDirectoryAtPath_withIntermediateDirectories_attributes_error(NSString path, boolean createIntermediates, NSDictionary attributes, PointerByReference error)
          createDirectoryAtPath:withIntermediateDirectories:attributes:error: creates a directory at the specified path.
abstract  boolean createFileAtPath_contents_attributes(NSString path, NSData data, NSDictionary attr)
          Original signature : -(BOOL)createFileAtPath:(NSString*) contents:(NSData*) attributes:(NSDictionary*)
native declaration : NSFileManager.h:225
abstract  boolean createSymbolicLinkAtPath_pathContent(NSString path, NSString otherpath)
          Original signature : -(BOOL)createSymbolicLinkAtPath:(NSString*) pathContent:(NSString*)
native declaration : NSFileManager.h:168
abstract  boolean createSymbolicLinkAtPath_withDestinationPath_error(NSString path, NSString destPath, PointerByReference error)
          createSymbolicLinkAtPath:withDestination:error: returns YES if the symbolic link that point at 'destPath' was able to be created at the location specified by 'path'.
abstract  NSString currentDirectoryPath()
          Process working directory management.
static NSFileManager defaultManager()
          Returns the default singleton instance.
abstract  NSObject delegate()
          Original signature : -(id)delegate
native declaration : NSFileManager.h:95
abstract  NSString destinationOfSymbolicLinkAtPath_error(NSString path, PointerByReference error)
          destinationOfSymbolicLinkAtPath:error: returns an NSString containing the path of the item pointed at by the symlink specified by 'path'.
abstract  NSArray directoryContentsAtPath(NSString path)
          Original signature : -(NSArray*)directoryContentsAtPath:(NSString*)
native declaration : NSFileManager.h:165
abstract  NSString displayNameAtPath(NSString path)
          displayNameAtPath: returns an NSString suitable for presentation to the user.
abstract  NSDirectoryEnumerator enumeratorAtPath(NSString path)
          enumeratorAtPath: returns an NSDirectoryEnumerator rooted at the provided path.
abstract  NSDictionary fileAttributesAtPath_traverseLink(NSString path, boolean yorn)
          The following methods are deprecated on Mac OS X 10.5.
abstract  boolean fileExistsAtPath_isDirectory(NSString path, boolean isDirectory)
          Original signature : -(BOOL)fileExistsAtPath:(NSString*) isDirectory:(BOOL*)
native declaration : NSFileManager.h:186
abstract  boolean fileExistsAtPath(NSString path)
          The following methods are of limited utility.
abstract  NSDictionary fileSystemAttributesAtPath(NSString path)
          Original signature : -(NSDictionary*)fileSystemAttributesAtPath:(NSString*)
native declaration : NSFileManager.h:166
abstract  String fileSystemRepresentationWithPath(NSString path)
          fileSystemRepresentationWithPath: returns an array of characters suitable for passing to lower-level POSIX style APIs.
static NSFileManager._class_ getNSClass()
           
abstract  boolean isDeletableFileAtPath(NSString path)
          Original signature : -(BOOL)isDeletableFileAtPath:(NSString*)
native declaration : NSFileManager.h:190
abstract  boolean isExecutableFileAtPath(NSString path)
          Original signature : -(BOOL)isExecutableFileAtPath:(NSString*)
native declaration : NSFileManager.h:189
abstract  boolean isReadableFileAtPath(NSString path)
          Original signature : -(BOOL)isReadableFileAtPath:(NSString*)
native declaration : NSFileManager.h:187
abstract  boolean isWritableFileAtPath(NSString path)
          Original signature : -(BOOL)isWritableFileAtPath:(NSString*)
native declaration : NSFileManager.h:188
abstract  boolean linkItemAtPath_toPath_error(NSString srcPath, NSString dstPath, PointerByReference error)
          Original signature : -(BOOL)linkItemAtPath:(NSString*) toPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:149
abstract  boolean linkItemAtURL_toURL_error(NSURL srcURL, NSURL dstURL, PointerByReference error)
          Original signature : -(BOOL)linkItemAtURL:(NSURL*) toURL:(NSURL*) error:(NSError**)
native declaration : NSFileManager.h:158
abstract  boolean linkPath_toPath_handler(NSString src, NSString dest, ObjCObject handler)
          Original signature : -(BOOL)linkPath:(NSString*) toPath:(NSString*) handler:(id)
native declaration : NSFileManager.h:172
abstract  NSArray mountedVolumeURLsIncludingResourceValuesForKeys_options(NSArray propertyKeys, NSUInteger options)
          -mountedVolumeURLsIncludingResourceValuesForKeys:options: returns an NSArray of NSURLs locating the mounted volumes available on the computer.
abstract  boolean moveItemAtPath_toPath_error(NSString srcPath, NSString dstPath, PointerByReference error)
          Original signature : -(BOOL)moveItemAtPath:(NSString*) toPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:148
abstract  boolean moveItemAtURL_toURL_error(NSURL srcURL, NSURL dstURL, PointerByReference error)
          Original signature : -(BOOL)moveItemAtURL:(NSURL*) toURL:(NSURL*) error:(NSError**)
native declaration : NSFileManager.h:157
abstract  boolean movePath_toPath_handler(NSString src, NSString dest, ObjCObject handler)
          Original signature : -(BOOL)movePath:(NSString*) toPath:(NSString*) handler:(id)
native declaration : NSFileManager.h:174
static NSFileManager new_()
           
abstract  NSString pathContentOfSymbolicLinkAtPath(NSString path)
          Original signature : -(NSString*)pathContentOfSymbolicLinkAtPath:(NSString*)
native declaration : NSFileManager.h:167
abstract  boolean removeFileAtPath_handler(NSString path, ObjCObject handler)
          Original signature : -(BOOL)removeFileAtPath:(NSString*) handler:(id)
native declaration : NSFileManager.h:175
abstract  boolean removeItemAtPath_error(NSString path, PointerByReference error)
          Original signature : -(BOOL)removeItemAtPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:150
abstract  boolean removeItemAtURL_error(NSURL URL, PointerByReference error)
          Original signature : -(BOOL)removeItemAtURL:(NSURL*) error:(NSError**)
native declaration : NSFileManager.h:159
abstract  boolean replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error(NSURL originalItemURL, NSURL newItemURL, NSString backupItemName, NSUInteger options, PointerByReference resultingURL, PointerByReference error)
          -replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is for developers who wish to perform a safe-save without using the full NSDocument machinery that is available in the AppKit.
abstract  boolean setAttributes_ofItemAtPath_error(NSDictionary attributes, NSString path, PointerByReference error)
          setAttributes:ofItemAtPath:error: returns YES when the attributes specified in the 'attributes' dictionary are set successfully on the item specified by 'path'.
abstract  void setDelegate(ObjCObject delegate)
          Instances of NSFileManager may now have delegates.
abstract  NSString stringWithFileSystemRepresentation_length(Pointer str, NSUInteger len)
          Deprecated. use the safer methods stringWithFileSystemRepresentation_length(java.lang.String, org.rococoa.cocoa.foundation.NSUInteger) and stringWithFileSystemRepresentation_length(com.sun.jna.Pointer, org.rococoa.cocoa.foundation.NSUInteger) instead
abstract  NSString stringWithFileSystemRepresentation_length(String str, NSUInteger len)
          stringWithFileSystemRepresentation:length: returns an NSString created from an array of bytes that are in the filesystem representation.
abstract  NSArray subpathsAtPath(NSString path)
          subpathsAtPath: returns an NSArray of all contents and subpaths recursively from the provided path.
abstract  NSArray subpathsOfDirectoryAtPath_error(NSString path, PointerByReference error)
          subpathsOfDirectoryAtPath:error: returns an NSArray of NSStrings represeting the filenames of the items in the specified directory and all its subdirectories recursively.
 
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.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

NSFileManager

public NSFileManager()
Method Detail

defaultManager

public static NSFileManager defaultManager()
Returns the default singleton instance.
Original signature : +(NSFileManager*)defaultManager
native declaration : NSFileManager.h:65


mountedVolumeURLsIncludingResourceValuesForKeys_options

public abstract NSArray mountedVolumeURLsIncludingResourceValuesForKeys_options(NSArray propertyKeys,
                                                                                NSUInteger options)
-mountedVolumeURLsIncludingResourceValuesForKeys:options: returns an NSArray of NSURLs locating the mounted volumes available on the computer. The property keys that can be requested are available in .
Original signature : -(NSArray*)mountedVolumeURLsIncludingResourceValuesForKeys:(NSArray*) options:(NSVolumeEnumerationOptions)
native declaration : NSFileManager.h:69


contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error

public abstract NSArray contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error(NSURL url,
                                                                                          NSArray keys,
                                                                                          NSUInteger mask,
                                                                                          PointerByReference error)
-contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error: returns an NSArray of NSURLs identifying the the directory entries. If this method returns nil, an NSError will be returned by reference in the 'error' parameter. If the directory contains no entries, this method will return the empty array. When an array is specified for the 'keys' parameter, the specified property values will be pre-fetched and cached with each enumerated URL.
This method always does a shallow enumeration of the specified directory (i.e. it always acts as if NSDirectoryEnumerationSkipsSubdirectoryDescendants has been specified). If you need to perform a deep enumeration, use +[NSFileManager enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:].
If you wish to only receive the URLs and no other attributes, then pass '0' for 'options' and an empty NSArray ('[NSArray array]') for 'keys'. If you wish to have the property caches of the vended URLs pre-populated with a default set of attributes, then pass '0' for 'options' and 'nil' for 'keys'.
Original signature : -(NSArray*)contentsOfDirectoryAtURL:(NSURL*) includingPropertiesForKeys:(NSArray*) options:(NSDirectoryEnumerationOptions) error:(NSError**)
native declaration : NSFileManager.h:77


setDelegate

public abstract void setDelegate(ObjCObject delegate)
Instances of NSFileManager may now have delegates. Each instance has one delegate, and the delegate is not retained. In versions of Mac OS X prior to 10.5, the behavior of calling [[NSFileManager alloc] init] was undefined. In Mac OS X 10.5 "Leopard" and later, calling [[NSFileManager alloc] init] returns a new instance of an NSFileManager.
Original signature : -(void)setDelegate:(id)
native declaration : NSFileManager.h:94


delegate

public abstract NSObject delegate()
Original signature : -(id)delegate
native declaration : NSFileManager.h:95


setAttributes_ofItemAtPath_error

public abstract boolean setAttributes_ofItemAtPath_error(NSDictionary attributes,
                                                         NSString path,
                                                         PointerByReference error)
setAttributes:ofItemAtPath:error: returns YES when the attributes specified in the 'attributes' dictionary are set successfully on the item specified by 'path'. If this method returns NO, a presentable NSError will be provided by-reference in the 'error' parameter. If no error is required, you may pass 'nil' for the error.
This method replaces changeFileAttributes:atPath:.
Original signature : -(BOOL)setAttributes:(NSDictionary*) ofItemAtPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:101


createDirectoryAtPath_withIntermediateDirectories_attributes_error

public abstract boolean createDirectoryAtPath_withIntermediateDirectories_attributes_error(NSString path,
                                                                                           boolean createIntermediates,
                                                                                           NSDictionary attributes,
                                                                                           PointerByReference error)
createDirectoryAtPath:withIntermediateDirectories:attributes:error: creates a directory at the specified path. If you pass 'NO' for createIntermediates, the directory must not exist at the time this call is made. Passing 'YES' for 'createIntermediates' will create any necessary intermediate directories. This method returns YES if all directories specified in 'path' were created and attributes were set. Directories are created with attributes specified by the dictionary passed to 'attributes'. If no dictionary is supplied, directories are created according to the umask of the process. This method returns NO if a failure occurs at any stage of the operation. If an error parameter was provided, a presentable NSError will be returned by reference.
This method replaces createDirectoryAtPath:attributes:
Original signature : -(BOOL)createDirectoryAtPath:(NSString*) withIntermediateDirectories:(BOOL) attributes:(NSDictionary*) error:(NSError**)
native declaration : NSFileManager.h:107


contentsOfDirectoryAtPath_error

public abstract NSArray contentsOfDirectoryAtPath_error(NSString path,
                                                        PointerByReference error)
contentsOfDirectoryAtPath:error: returns an NSArray of NSStrings representing the filenames of the items in the directory. If this method returns 'nil', an NSError will be returned by reference in the 'error' parameter. If the directory contains no items, this method will return the empty array.
This method replaces directoryContentsAtPath:
Original signature : -(NSArray*)contentsOfDirectoryAtPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:113


subpathsOfDirectoryAtPath_error

public abstract NSArray subpathsOfDirectoryAtPath_error(NSString path,
                                                        PointerByReference error)
subpathsOfDirectoryAtPath:error: returns an NSArray of NSStrings represeting the filenames of the items in the specified directory and all its subdirectories recursively. If this method returns 'nil', an NSError will be returned by reference in the 'error' parameter. If the directory contains no items, this method will return the empty array.
This method replaces subpathsAtPath:
Original signature : -(NSArray*)subpathsOfDirectoryAtPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:119


attributesOfItemAtPath_error

public abstract NSDictionary attributesOfItemAtPath_error(NSString path,
                                                          PointerByReference error)
attributesOfItemAtPath:error: returns an NSDictionary of key/value pairs containing the attributes of the item (file, directory, symlink, etc.) at the path in question. If this method returns 'nil', an NSError will be returned by reference in the 'error' parameter. This method does not traverse a terminal symlink.
This method replaces fileAttributesAtPath:traverseLink:.
Original signature : -(NSDictionary*)attributesOfItemAtPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:125


attributesOfFileSystemForPath_error

public abstract NSDictionary attributesOfFileSystemForPath_error(NSString path,
                                                                 PointerByReference error)
attributesOfFileSystemForPath:error: returns an NSDictionary of key/value pairs containing the attributes of the filesystem containing the provided path. If this method returns 'nil', an NSError will be returned by reference in the 'error' parameter. This method does not traverse a terminal symlink.
This method replaces fileSystemAttributesAtPath:.
Original signature : -(NSDictionary*)attributesOfFileSystemForPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:131


createSymbolicLinkAtPath_withDestinationPath_error

public abstract boolean createSymbolicLinkAtPath_withDestinationPath_error(NSString path,
                                                                           NSString destPath,
                                                                           PointerByReference error)
createSymbolicLinkAtPath:withDestination:error: returns YES if the symbolic link that point at 'destPath' was able to be created at the location specified by 'path'. If this method returns NO, the link was unable to be created and an NSError will be returned by reference in the 'error' parameter. This method does not traverse a terminal symlink.
This method replaces createSymbolicLinkAtPath:pathContent:
Original signature : -(BOOL)createSymbolicLinkAtPath:(NSString*) withDestinationPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:137


destinationOfSymbolicLinkAtPath_error

public abstract NSString destinationOfSymbolicLinkAtPath_error(NSString path,
                                                               PointerByReference error)
destinationOfSymbolicLinkAtPath:error: returns an NSString containing the path of the item pointed at by the symlink specified by 'path'. If this method returns 'nil', an NSError will be returned by reference in the 'error' parameter.
This method replaces pathContentOfSymbolicLinkAtPath:
Original signature : -(NSString*)destinationOfSymbolicLinkAtPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:143


copyItemAtPath_toPath_error

public abstract boolean copyItemAtPath_toPath_error(NSString srcPath,
                                                    NSString dstPath,
                                                    PointerByReference error)
These methods replace their non-error returning counterparts below. See the NSFileManagerFileOperationAdditions category below for methods that are dispatched to the NSFileManager instance's delegate.
Original signature : -(BOOL)copyItemAtPath:(NSString*) toPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:147


moveItemAtPath_toPath_error

public abstract boolean moveItemAtPath_toPath_error(NSString srcPath,
                                                    NSString dstPath,
                                                    PointerByReference error)
Original signature : -(BOOL)moveItemAtPath:(NSString*) toPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:148


linkItemAtPath_toPath_error

public abstract boolean linkItemAtPath_toPath_error(NSString srcPath,
                                                    NSString dstPath,
                                                    PointerByReference error)
Original signature : -(BOOL)linkItemAtPath:(NSString*) toPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:149


removeItemAtPath_error

public abstract boolean removeItemAtPath_error(NSString path,
                                               PointerByReference error)
Original signature : -(BOOL)removeItemAtPath:(NSString*) error:(NSError**)
native declaration : NSFileManager.h:150


copyItemAtURL_toURL_error

public abstract boolean copyItemAtURL_toURL_error(NSURL srcURL,
                                                  NSURL dstURL,
                                                  PointerByReference error)
These methods are URL-taking equivalents of the four methods above. Their delegate methods are defined in the NSFileManagerFileOperationAdditions category below.
Original signature : -(BOOL)copyItemAtURL:(NSURL*) toURL:(NSURL*) error:(NSError**)
native declaration : NSFileManager.h:156


moveItemAtURL_toURL_error

public abstract boolean moveItemAtURL_toURL_error(NSURL srcURL,
                                                  NSURL dstURL,
                                                  PointerByReference error)
Original signature : -(BOOL)moveItemAtURL:(NSURL*) toURL:(NSURL*) error:(NSError**)
native declaration : NSFileManager.h:157


linkItemAtURL_toURL_error

public abstract boolean linkItemAtURL_toURL_error(NSURL srcURL,
                                                  NSURL dstURL,
                                                  PointerByReference error)
Original signature : -(BOOL)linkItemAtURL:(NSURL*) toURL:(NSURL*) error:(NSError**)
native declaration : NSFileManager.h:158


removeItemAtURL_error

public abstract boolean removeItemAtURL_error(NSURL URL,
                                              PointerByReference error)
Original signature : -(BOOL)removeItemAtURL:(NSURL*) error:(NSError**)
native declaration : NSFileManager.h:159


fileAttributesAtPath_traverseLink

public abstract NSDictionary fileAttributesAtPath_traverseLink(NSString path,
                                                               boolean yorn)
The following methods are deprecated on Mac OS X 10.5. Their URL-based and/or error-returning replacements are listed above.
Original signature : -(NSDictionary*)fileAttributesAtPath:(NSString*) traverseLink:(BOOL)
native declaration : NSFileManager.h:163


changeFileAttributes_atPath

public abstract boolean changeFileAttributes_atPath(NSDictionary attributes,
                                                    NSString path)
Original signature : -(BOOL)changeFileAttributes:(NSDictionary*) atPath:(NSString*)
native declaration : NSFileManager.h:164


directoryContentsAtPath

public abstract NSArray directoryContentsAtPath(NSString path)
Original signature : -(NSArray*)directoryContentsAtPath:(NSString*)
native declaration : NSFileManager.h:165


fileSystemAttributesAtPath

public abstract NSDictionary fileSystemAttributesAtPath(NSString path)
Original signature : -(NSDictionary*)fileSystemAttributesAtPath:(NSString*)
native declaration : NSFileManager.h:166


pathContentOfSymbolicLinkAtPath

public abstract NSString pathContentOfSymbolicLinkAtPath(NSString path)
Original signature : -(NSString*)pathContentOfSymbolicLinkAtPath:(NSString*)
native declaration : NSFileManager.h:167


createSymbolicLinkAtPath_pathContent

public abstract boolean createSymbolicLinkAtPath_pathContent(NSString path,
                                                             NSString otherpath)
Original signature : -(BOOL)createSymbolicLinkAtPath:(NSString*) pathContent:(NSString*)
native declaration : NSFileManager.h:168


createDirectoryAtPath_attributes

public abstract boolean createDirectoryAtPath_attributes(NSString path,
                                                         NSDictionary attributes)
Original signature : -(BOOL)createDirectoryAtPath:(NSString*) attributes:(NSDictionary*)
native declaration : NSFileManager.h:169


linkPath_toPath_handler

public abstract boolean linkPath_toPath_handler(NSString src,
                                                NSString dest,
                                                ObjCObject handler)
Original signature : -(BOOL)linkPath:(NSString*) toPath:(NSString*) handler:(id)
native declaration : NSFileManager.h:172


copyPath_toPath_handler

public abstract boolean copyPath_toPath_handler(NSString src,
                                                NSString dest,
                                                ObjCObject handler)
Original signature : -(BOOL)copyPath:(NSString*) toPath:(NSString*) handler:(id)
native declaration : NSFileManager.h:173


movePath_toPath_handler

public abstract boolean movePath_toPath_handler(NSString src,
                                                NSString dest,
                                                ObjCObject handler)
Original signature : -(BOOL)movePath:(NSString*) toPath:(NSString*) handler:(id)
native declaration : NSFileManager.h:174


removeFileAtPath_handler

public abstract boolean removeFileAtPath_handler(NSString path,
                                                 ObjCObject handler)
Original signature : -(BOOL)removeFileAtPath:(NSString*) handler:(id)
native declaration : NSFileManager.h:175


currentDirectoryPath

public abstract NSString currentDirectoryPath()
Process working directory management. Despite the fact that these are instance methods on NSFileManager, these methods report and change (respectively) the working directory for the entire process. Developers are cautioned that doing so is fraught with peril.
Original signature : -(NSString*)currentDirectoryPath
native declaration : NSFileManager.h:180


changeCurrentDirectoryPath

public abstract boolean changeCurrentDirectoryPath(NSString path)
Original signature : -(BOOL)changeCurrentDirectoryPath:(NSString*)
native declaration : NSFileManager.h:181


fileExistsAtPath

public abstract boolean fileExistsAtPath(NSString path)
The following methods are of limited utility. Attempting to predicate behavior based on the current state of the filesystem or a particular file on the filesystem is encouraging odd behavior in the face of filesystem race conditions. It's far better to attempt an operation (like loading a file or creating a directory) and handle the error gracefully than it is to try to figure out ahead of time whether the operation will succeed.
Original signature : -(BOOL)fileExistsAtPath:(NSString*)
native declaration : NSFileManager.h:185


fileExistsAtPath_isDirectory

public abstract boolean fileExistsAtPath_isDirectory(NSString path,
                                                     boolean isDirectory)
Original signature : -(BOOL)fileExistsAtPath:(NSString*) isDirectory:(BOOL*)
native declaration : NSFileManager.h:186


isReadableFileAtPath

public abstract boolean isReadableFileAtPath(NSString path)
Original signature : -(BOOL)isReadableFileAtPath:(NSString*)
native declaration : NSFileManager.h:187


isWritableFileAtPath

public abstract boolean isWritableFileAtPath(NSString path)
Original signature : -(BOOL)isWritableFileAtPath:(NSString*)
native declaration : NSFileManager.h:188


isExecutableFileAtPath

public abstract boolean isExecutableFileAtPath(NSString path)
Original signature : -(BOOL)isExecutableFileAtPath:(NSString*)
native declaration : NSFileManager.h:189


isDeletableFileAtPath

public abstract boolean isDeletableFileAtPath(NSString path)
Original signature : -(BOOL)isDeletableFileAtPath:(NSString*)
native declaration : NSFileManager.h:190


contentsEqualAtPath_andPath

public abstract boolean contentsEqualAtPath_andPath(NSString path1,
                                                    NSString path2)
-contentsEqualAtPath:andPath: does not take into account data stored in the resource fork or filesystem extended attributes.
Original signature : -(BOOL)contentsEqualAtPath:(NSString*) andPath:(NSString*)
native declaration : NSFileManager.h:194


displayNameAtPath

public abstract NSString displayNameAtPath(NSString path)
displayNameAtPath: returns an NSString suitable for presentation to the user. For directories which have localization information, this will return the appropriate localized string. This string is not suitable for passing to anything that must interact with the filesystem.
Original signature : -(NSString*)displayNameAtPath:(NSString*)
native declaration : NSFileManager.h:198


componentsToDisplayForPath

public abstract NSArray componentsToDisplayForPath(NSString path)
componentsToDisplayForPath: returns an NSArray of display names for the path provided. Localization will occur as in displayNameAtPath: above. This array cannot and should not be reassembled into an usable filesystem path for any kind of access.
Original signature : -(NSArray*)componentsToDisplayForPath:(NSString*)
native declaration : NSFileManager.h:203


enumeratorAtPath

public abstract NSDirectoryEnumerator enumeratorAtPath(NSString path)
enumeratorAtPath: returns an NSDirectoryEnumerator rooted at the provided path. If the enumerator cannot be created, this returns NULL. Because NSDirectoryEnumerator is a subclass of NSEnumerator, the returned object can be used in the for...in construct.
Original signature : -(NSDirectoryEnumerator*)enumeratorAtPath:(NSString*)
native declaration : NSFileManager.h:208


subpathsAtPath

public abstract NSArray subpathsAtPath(NSString path)
subpathsAtPath: returns an NSArray of all contents and subpaths recursively from the provided path. This may be very expensive to compute for deep filesystem hierarchies, and should probably be avoided.
Original signature : -(NSArray*)subpathsAtPath:(NSString*)
native declaration : NSFileManager.h:220


contentsAtPath

public abstract NSData contentsAtPath(NSString path)
These methods are provided here for compatibility. The corresponding methods on NSData which return NSErrors should be regarded as the primary method of creating a file from an NSData or retrieving the contents of a file as an NSData.
Original signature : -(NSData*)contentsAtPath:(NSString*)
native declaration : NSFileManager.h:224


createFileAtPath_contents_attributes

public abstract boolean createFileAtPath_contents_attributes(NSString path,
                                                             NSData data,
                                                             NSDictionary attr)
Original signature : -(BOOL)createFileAtPath:(NSString*) contents:(NSData*) attributes:(NSDictionary*)
native declaration : NSFileManager.h:225


fileSystemRepresentationWithPath

public abstract String fileSystemRepresentationWithPath(NSString path)
fileSystemRepresentationWithPath: returns an array of characters suitable for passing to lower-level POSIX style APIs. The string is provided in the representation most appropriate for the filesystem in question.
Original signature : -(const char*)fileSystemRepresentationWithPath:(NSString*)
native declaration : NSFileManager.h:229


stringWithFileSystemRepresentation_length

@Deprecated
public abstract NSString stringWithFileSystemRepresentation_length(Pointer str,
                                                                              NSUInteger len)
Deprecated. use the safer methods stringWithFileSystemRepresentation_length(java.lang.String, org.rococoa.cocoa.foundation.NSUInteger) and stringWithFileSystemRepresentation_length(com.sun.jna.Pointer, org.rococoa.cocoa.foundation.NSUInteger) instead

stringWithFileSystemRepresentation:length: returns an NSString created from an array of bytes that are in the filesystem representation.
Original signature : -(NSString*)stringWithFileSystemRepresentation:(const char*) length:(NSUInteger)
native declaration : NSFileManager.h:233


stringWithFileSystemRepresentation_length

public abstract NSString stringWithFileSystemRepresentation_length(String str,
                                                                   NSUInteger len)
stringWithFileSystemRepresentation:length: returns an NSString created from an array of bytes that are in the filesystem representation.
Original signature : -(NSString*)stringWithFileSystemRepresentation:(const char*) length:(NSUInteger)
native declaration : NSFileManager.h:233


replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error

public abstract boolean replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error(NSURL originalItemURL,
                                                                                                     NSURL newItemURL,
                                                                                                     NSString backupItemName,
                                                                                                     NSUInteger options,
                                                                                                     PointerByReference resultingURL,
                                                                                                     PointerByReference error)
-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is for developers who wish to perform a safe-save without using the full NSDocument machinery that is available in the AppKit.
The `originalItemURL` is the item being replaced.
`newItemURL` is the item which will replace the original item. This item should be placed in a temporary directory as provided by the OS, or in a uniquely named directory placed in the same directory as the original item if the temporary directory is not available.
If `backupItemName` is provided, that name will be used to create a backup of the original item. The backup is placed in the same directory as the original item. If an error occurs during the creation of the backup item, the operation will fail. If there is already an item with the same name as the backup item, that item will be removed. The backup item will be removed in the event of success unless the `NSFileManagerItemReplacementWithoutDeletingBackupItem` option is provided in `options`.
For `options`, pass `0` to get the default behavior, which uses only the metadata from the new item while adjusting some properties using values from the original item. Pass `NSFileManagerItemReplacementUsingNewMetadataOnly` in order to use all possible metadata from the new item.
Original signature : -(BOOL)replaceItemAtURL:(NSURL*) withItemAtURL:(NSURL*) backupItemName:(NSString*) options:(NSFileManagerItemReplacementOptions) resultingItemURL:(NSURL**) error:(NSError**)
native declaration : NSFileManager.h:242


alloc

public static NSFileManager alloc()

new_

public static NSFileManager new_()

getNSClass

public static NSFileManager._class_ getNSClass()


Copyright © 2009. All Rights Reserved.