org.rococoa.cocoa.foundation
Class NSFileManager
java.lang.Object
org.rococoa.cocoa.foundation.NSObject
org.rococoa.cocoa.foundation.NSFileManager
- All Implemented Interfaces:
- ABActionDelegate, AMWorkflowControllerDelegate, IMVideoDataSource, NSAccessibility, NSAccessibilityAdditions, NSAnimationDelegate, NSApplicationScriptingDelegation, NSArchiverCallback, NSBrowserDelegate, NSClassDescriptionPrimitives, NSCoderMethods, NSColorPanelResponderMethod, NSComboBoxCellDataSource, NSComboBoxDataSource, NSComboBoxNotifications, NSComparisonMethods, NSConnectionDelegateMethods, NSControlSubclassDelegate, NSControlSubclassNotifications, NSCopyLinkMoveHandler, NSDatePickerCellDelegate, NSDelayedPerforming, NSDeprecatedKeyValueCoding, NSDeprecatedKeyValueObservingCustomization, NSDeprecatedMethods, NSDictionaryControllerKeyValuePair, NSDistantObjectRequestMethods, NSDistributedObjects, NSDraggingDestination, NSDraggingSource, NSDrawerDelegate, NSDrawerNotifications, NSEditor, NSEditorRegistration, NSErrorRecoveryAttempting, NSExceptionHandlerDelegate, NSFileManagerFileOperationAdditions, NSFontManagerDelegate, NSFontManagerResponderMethod, NSFontPanelValidationAdditions, NSImageDelegate, NSKeyedArchiverDelegate, NSKeyedArchiverObjectSubstitution, NSKeyedUnarchiverDelegate, NSKeyedUnarchiverObjectSubstitution, NSKeyValueBindingCreation, NSKeyValueCoding, NSKeyValueObserverNotification, NSKeyValueObserverRegistration, NSKeyValueObserving, NSKeyValueObservingCustomization, NSLayoutManagerDelegate, NSMenuDelegate, NSMenuValidation, NSMetadataQueryDelegate, NSNetServiceBrowserDelegateMethods, NSNetServiceDelegateMethods, NSNibAwaking, NSOutlineViewDataSource, NSOutlineViewDelegate, NSOutlineViewNotifications, NSPasteboardOwner, NSPlaceholders, NSPortDelegateMethods, NSRuleEditorDelegateMethods, NSSavePanelDelegate, NSScriptClassDescription, NSScripting, NSScriptingComparisonMethods, NSScriptKeyValueCoding, NSScriptObjectSpecifiers, NSSoundDelegateMethods, NSSpeechRecognizerDelegate, NSSpeechSynthesizerDelegate, NSSpellServerDelegate, NSSplitViewDelegate, NSStreamDelegateEventExtensions, NSTabViewDelegate, NSTextDelegate, NSTextViewDelegate, NSThreadPerformAdditions, NSTokenFieldCellDelegate, NSTokenFieldDelegate, NSToolbarDelegate, NSToolbarNotifications, NSURLClient, NSURLConnectionDelegate, NSURLDownloadDelegate, NSWindowDelegate, NSWindowNotifications, NSXMLParserDelegateEventAdditions, QTCaptureDecompressedVideoOutputDelegate, QTCaptureFileOutputDelegate, QTCaptureVideoPreviewOutputDelegate, QTCaptureViewDelegate, QTMovieDelegate, QTMovieViewDelegate, SFAuthorizationViewDelegate, SFCertificatePanelDelegate, SFChooseIdentityPanelDelegate, WebDownloadDelegate, WebFrameLoadDelegate, WebJavaPlugIn, WebPlugIn, WebPlugInContainer, WebPolicyDelegate, WebResourceLoadDelegate, WebScripting, WebUIDelegate, WebViewEditingDelegate, NSObject
public abstract class NSFileManager
- extends NSObject
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.
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)
|
abstract boolean |
changeFileAttributes_atPath(NSDictionary attributes,
NSString path)
|
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 boolean |
copyItemAtPath_toPath_error(NSString srcPath,
NSString dstPath,
PointerByReference error)
These methods replace their non-error returning counterparts below. |
abstract boolean |
copyPath_toPath_handler(NSString src,
NSString dest,
org.rococoa.ID handler)
|
abstract boolean |
createDirectoryAtPath_attributes(NSString path,
NSDictionary attributes)
|
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)
|
abstract boolean |
createSymbolicLinkAtPath_pathContent(NSString path,
NSString otherpath)
|
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()
|
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)
|
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 will be deprecated in the next major release of Mac OS X after Leopard. |
abstract boolean |
fileExistsAtPath_isDirectory(NSString path,
boolean isDirectory)
|
abstract boolean |
fileExistsAtPath(NSString path)
The following methods are of limited utility. |
abstract NSDictionary |
fileSystemAttributesAtPath(NSString path)
|
abstract ByteByReference |
fileSystemRepresentationWithPath(NSString path)
fileSystemRepresentationWithPath: returns an array of characters suitable for passing to lower-level POSIX style APIs. |
abstract boolean |
isDeletableFileAtPath(NSString path)
|
abstract boolean |
isExecutableFileAtPath(NSString path)
|
abstract boolean |
isReadableFileAtPath(NSString path)
|
abstract boolean |
isWritableFileAtPath(NSString path)
|
abstract boolean |
linkItemAtPath_toPath_error(NSString srcPath,
NSString dstPath,
PointerByReference error)
|
abstract boolean |
linkPath_toPath_handler(NSString src,
NSString dest,
org.rococoa.ID handler)
|
abstract boolean |
moveItemAtPath_toPath_error(NSString srcPath,
NSString dstPath,
PointerByReference error)
|
abstract boolean |
movePath_toPath_handler(NSString src,
NSString dest,
org.rococoa.ID handler)
|
abstract NSString |
pathContentOfSymbolicLinkAtPath(NSString path)
|
abstract boolean |
removeFileAtPath_handler(NSString path,
org.rococoa.ID handler)
|
abstract boolean |
removeItemAtPath_error(NSString path,
PointerByReference error)
|
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(org.rococoa.ID delegate)
Instances of NSFileManager may now have delegates. |
abstract NSString |
stringWithFileSystemRepresentation_length(ByteByReference str,
int len)
Deprecated. use the safer method stringWithFileSystemRepresentation_length(java.lang.String, int) instead |
abstract NSString |
stringWithFileSystemRepresentation_length(String str,
int 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 |
copy, create, dealloc, description, doesNotRecognizeSelector, finalize, forwardInvocation, id, init, isKindOfClass, isKindOfClass, methodSignatureForSelector, mutableCopy, release, retain, retainCount |
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject |
autorelease, class_, conformsToProtocol, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, performSelector_withObject_withObject, performSelector_withObject, performSelector, respondsToSelector, self, superclass, zone |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.WebUIDelegate |
webView_contextMenuItemsForElement_defaultMenuItems, webView_createWebViewModalDialogWithRequest, webView_createWebViewWithRequest, webView_dragDestinationActionMaskForDraggingInfo, webView_dragDestinationActionMaskForDraggingInfo, webView_makeFirstResponder, webView_mouseDidMoveOverElement_modifierFlags, webView_printFrameView, webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame, webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame, webView_runJavaScriptAlertPanelWithMessage, webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame, webView_runJavaScriptConfirmPanelWithMessage, webView_runJavaScriptTextInputPanelWithPrompt_defaultText_initiatedByFrame, webView_runJavaScriptTextInputPanelWithPrompt_defaultText, webView_runOpenPanelForFileButtonWithResultListener, webView_runOpenPanelForFileButtonWithResultListener, webView_setResizable, webView_setStatusBarVisible, webView_setStatusText, webView_setToolbarsVisible, webView_shouldPerformAction_fromSender, webView_validateUserInterfaceItem_defaultValidation, webView_validateUserInterfaceItem_defaultValidation, webView_willPerformDragDestinationAction_forDraggingInfo, webView_willPerformDragDestinationAction_forDraggingInfo, webViewAreToolbarsVisible, webViewClose, webViewContentRect, webViewFirstResponder, webViewFocus, webViewFooterHeight, webViewFrame, webViewHeaderHeight, webViewIsResizable, webViewIsStatusBarVisible, webViewRunModal, webViewShow, webViewStatusText, webViewUnfocus |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSBrowserDelegate |
browser_acceptDrop_atRow_column_dropOperation, browser_acceptDrop_atRow_column_dropOperation, browser_canDragRowsWithIndexes_inColumn_withEvent, browser_createRowsForColumn_inMatrix, browser_isColumnValid, browser_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_inColumn, browser_nextTypeSelectMatchFromRow_toRow_inColumn_forString, browser_numberOfRowsInColumn, browser_selectCellWithString_inColumn, browser_selectRow_inColumn, browser_shouldShowCellExpansionForRow_column, browser_shouldSizeColumn_forUserResize_toWidth, browser_shouldTypeSelectForEvent_withCurrentSearchString, browser_sizeToFitWidthOfColumn, browser_titleOfColumn, browser_typeSelectStringForRow_inColumn, browser_validateDrop_proposedRow_column_dropOperation, browser_validateDrop_proposedRow_column_dropOperation, browser_willDisplayCell_atRow_column, browser_writeRowsWithIndexes_inColumn_toPasteboard, browserColumnConfigurationDidChange, browserDidScroll, browserWillScroll |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSKeyValueCoding |
dictionaryWithValuesForKeys, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, setNilValueForKey, setValue_forKey, setValue_forKeyPath, setValue_forUndefinedKey, setValuesForKeysWithDictionary, validateValue_forKey_error, validateValue_forKeyPath_error, valueForKey, valueForKeyPath, valueForUndefinedKey |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSOutlineViewDelegate |
outlineView_dataCellForTableColumn_item, outlineView_didClickTableColumn, outlineView_didDragTableColumn, outlineView_heightOfRowByItem, outlineView_isGroupItem, outlineView_mouseDownInHeaderOfTableColumn, outlineView_nextTypeSelectMatchFromItem_toItem_forString, outlineView_selectionIndexesForProposedSelection, outlineView_shouldCollapseItem, outlineView_shouldEditTableColumn_item, outlineView_shouldExpandItem, outlineView_shouldSelectItem, outlineView_shouldSelectTableColumn, outlineView_shouldShowCellExpansionForTableColumn_item, outlineView_shouldTrackCell_forTableColumn_item, outlineView_shouldTypeSelectForEvent_withCurrentSearchString, outlineView_typeSelectStringForTableColumn_item, outlineView_willDisplayCell_forTableColumn_item, outlineView_willDisplayOutlineCell_forTableColumn_item, selectionShouldChangeInOutlineView |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.WebViewEditingDelegate |
undoManagerForWebView, webView_doCommandBySelector, webView_shouldApplyStyle_toElementsInDOMRange, webView_shouldBeginEditingInDOMRange, webView_shouldChangeTypingStyle_toStyle, webView_shouldDeleteDOMRange, webView_shouldEndEditingInDOMRange, webView_shouldInsertNode_replacingDOMRange_givenAction, webView_shouldInsertText_replacingDOMRange_givenAction, webViewDidBeginEditing, webViewDidChange, webViewDidChangeSelection, webViewDidChangeTypingStyle, webViewDidEndEditing |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.WebFrameLoadDelegate |
webView_didCancelClientRedirectForFrame, webView_didChangeLocationWithinPageForFrame, webView_didClearWindowObject_forFrame, webView_didCommitLoadForFrame, webView_didFailLoadWithError_forFrame, webView_didFailProvisionalLoadWithError_forFrame, webView_didFinishLoadForFrame, webView_didReceiveIcon_forFrame, webView_didReceiveServerRedirectForProvisionalLoadForFrame, webView_didReceiveTitle_forFrame, webView_didStartProvisionalLoadForFrame, webView_willCloseFrame, webView_windowScriptObjectAvailable |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSTokenFieldDelegate |
tokenField_completionsForSubstring_indexOfToken_indexOfSelectedItem, tokenField_completionsForSubstring_indexOfToken_indexOfSelectedItem, tokenField_displayStringForRepresentedObject, tokenField_editingStringForRepresentedObject, tokenField_hasMenuForRepresentedObject, tokenField_menuForRepresentedObject, tokenField_readFromPasteboard, tokenField_representedObjectForEditingString, tokenField_shouldAddObjects_atIndex, tokenField_styleForRepresentedObject, tokenField_writeRepresentedObjects_toPasteboard |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSXMLParserDelegateEventAdditions |
parser_didEndElement_namespaceURI_qualifiedName, parser_didEndMappingPrefix, parser_didStartElement_namespaceURI_qualifiedName_attributes, parser_didStartMappingPrefix_toURI, parser_foundAttributeDeclarationWithName_forElement_type_defaultValue, parser_foundCDATA, parser_foundCharacters, parser_foundComment, parser_foundElementDeclarationWithName_model, parser_foundExternalEntityDeclarationWithName_publicID_systemID, parser_foundIgnorableWhitespace, parser_foundInternalEntityDeclarationWithName_value, parser_foundNotationDeclarationWithName_publicID_systemID, parser_foundProcessingInstructionWithTarget_data, parser_foundUnparsedEntityDeclarationWithName_publicID_systemID_notationName, parser_parseErrorOccurred, parser_resolveExternalEntityName_systemID, parser_validationErrorOccurred, parserDidEndDocument, parserDidStartDocument |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSDraggingDestination |
concludeDragOperation, concludeDragOperation, draggingEnded, draggingEnded, draggingEntered, draggingEntered, draggingExited, draggingExited, draggingUpdated, draggingUpdated, performDragOperation, performDragOperation, prepareForDragOperation, prepareForDragOperation, wantsPeriodicDraggingUpdates |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSOutlineViewDataSource |
outlineView_acceptDrop_item_childIndex, outlineView_acceptDrop_item_childIndex, outlineView_child_ofItem, outlineView_isItemExpandable, outlineView_itemForPersistentObject, outlineView_namesOfPromisedFilesDroppedAtDestination_forDraggedItems, outlineView_numberOfChildrenOfItem, outlineView_objectValueForTableColumn_byItem, outlineView_persistentObjectForItem, outlineView_setObjectValue_forTableColumn_byItem, outlineView_sortDescriptorsDidChange, outlineView_validateDrop_proposedItem_proposedChildIndex, outlineView_validateDrop_proposedItem_proposedChildIndex, outlineView_writeItems_toPasteboard |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSURLDownloadDelegate |
download_decideDestinationWithSuggestedFilename, download_didCancelAuthenticationChallenge, download_didCreateDestination, download_didFailWithError, download_didReceiveAuthenticationChallenge, download_didReceiveDataOfLength, download_didReceiveResponse, download_shouldDecodeSourceDataOfMIMEType, download_willResumeWithResponse_fromByte, download_willSendRequest_redirectResponse, downloadDidBegin, downloadDidFinish |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSAccessibility |
accessibilityActionDescription, accessibilityActionNames, accessibilityAttributeNames, accessibilityAttributeValue_forParameter, accessibilityAttributeValue, accessibilityFocusedUIElement, accessibilityIsAttributeSettable, accessibilityIsIgnored, accessibilityParameterizedAttributeNames, accessibilityPerformAction, accessibilitySetValue_forAttribute |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSTextViewDelegate |
textView_clickedOnLink_atIndex, textView_clickedOnLink, textView_doCommandBySelector, textView_menu_forEvent_atIndex, textView_shouldChangeTextInRanges_replacementStrings, textView_shouldChangeTypingAttributes_toAttributes, textView_willChangeSelectionFromCharacterRanges_toCharacterRanges, textView_willDisplayToolTip_forCharacterAtIndex, textView_writablePasteboardTypesForCell_atIndex, textView_writablePasteboardTypesForCell_atIndex, textView_writeCell_atIndex_toPasteboard_type, textView_writeCell_atIndex_toPasteboard_type, textViewDidChangeSelection, textViewDidChangeTypingAttributes, undoManagerForTextView |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSTokenFieldCellDelegate |
tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem, tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem, tokenFieldCell_displayStringForRepresentedObject, tokenFieldCell_editingStringForRepresentedObject, tokenFieldCell_hasMenuForRepresentedObject, tokenFieldCell_menuForRepresentedObject, tokenFieldCell_readFromPasteboard, tokenFieldCell_representedObjectForEditingString, tokenFieldCell_shouldAddObjects_atIndex, tokenFieldCell_styleForRepresentedObject, tokenFieldCell_writeRepresentedObjects_toPasteboard |
Methods inherited from interface org.rococoa.cocoa.foundation.categories.NSWindowNotifications |
windowDidBecomeKey, windowDidBecomeMain, windowDidChangeScreen, windowDidChangeScreenProfile, windowDidDeminiaturize, windowDidEndSheet, windowDidExpose, windowDidMiniaturize, windowDidMove, windowDidResignKey, windowDidResignMain, windowDidResize, windowDidUpdate, windowWillBeginSheet, windowWillClose, windowWillMiniaturize, windowWillMove |
NSFileManager
public NSFileManager()
defaultManager
public static NSFileManager defaultManager()
- Returns the default singleton instance.
Original signature : +(NSFileManager*)defaultManager
setDelegate
public abstract void setDelegate(org.rococoa.ID 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)
delegate
public abstract NSObject delegate()
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**)
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**)
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**)
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**)
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 an initial symlink.
This method replaces fileAttributesAtPath:traverseLink:.
Original signature : -(NSDictionary*)attributesOfItemAtPath:(NSString*) error:(NSError**)
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 an initial symlink.
This method replaces fileSystemAttributesAtPath:.
Original signature : -(NSDictionary*)attributesOfFileSystemForPath:(NSString*) error:(NSError**)
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 an initial symlink.
This method replaces createSymbolicLinkAtPath:pathContent:
Original signature : -(BOOL)createSymbolicLinkAtPath:(NSString*) withDestinationPath:(NSString*) error:(NSError**)
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 does not traverse an initial symlink.
This method replaces pathContentOfSymbolicLinkAtPath:
Original signature : -(NSString*)destinationOfSymbolicLinkAtPath:(NSString*) error:(NSError**)
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**)
moveItemAtPath_toPath_error
public abstract boolean moveItemAtPath_toPath_error(NSString srcPath,
NSString dstPath,
PointerByReference error)
linkItemAtPath_toPath_error
public abstract boolean linkItemAtPath_toPath_error(NSString srcPath,
NSString dstPath,
PointerByReference error)
removeItemAtPath_error
public abstract boolean removeItemAtPath_error(NSString path,
PointerByReference error)
fileAttributesAtPath_traverseLink
public abstract NSDictionary fileAttributesAtPath_traverseLink(NSString path,
boolean yorn)
- The following methods will be deprecated in the next major release of Mac OS X after Leopard. Their error-returning replacements are listed above.
Original signature : -(NSDictionary*)fileAttributesAtPath:(NSString*) traverseLink:(BOOL)
changeFileAttributes_atPath
public abstract boolean changeFileAttributes_atPath(NSDictionary attributes,
NSString path)
directoryContentsAtPath
public abstract NSArray directoryContentsAtPath(NSString path)
fileSystemAttributesAtPath
public abstract NSDictionary fileSystemAttributesAtPath(NSString path)
pathContentOfSymbolicLinkAtPath
public abstract NSString pathContentOfSymbolicLinkAtPath(NSString path)
createSymbolicLinkAtPath_pathContent
public abstract boolean createSymbolicLinkAtPath_pathContent(NSString path,
NSString otherpath)
createDirectoryAtPath_attributes
public abstract boolean createDirectoryAtPath_attributes(NSString path,
NSDictionary attributes)
linkPath_toPath_handler
public abstract boolean linkPath_toPath_handler(NSString src,
NSString dest,
org.rococoa.ID handler)
copyPath_toPath_handler
public abstract boolean copyPath_toPath_handler(NSString src,
NSString dest,
org.rococoa.ID handler)
movePath_toPath_handler
public abstract boolean movePath_toPath_handler(NSString src,
NSString dest,
org.rococoa.ID handler)
removeFileAtPath_handler
public abstract boolean removeFileAtPath_handler(NSString path,
org.rococoa.ID handler)
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
changeCurrentDirectoryPath
public abstract boolean changeCurrentDirectoryPath(NSString path)
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*)
fileExistsAtPath_isDirectory
public abstract boolean fileExistsAtPath_isDirectory(NSString path,
boolean isDirectory)
isReadableFileAtPath
public abstract boolean isReadableFileAtPath(NSString path)
isWritableFileAtPath
public abstract boolean isWritableFileAtPath(NSString path)
isExecutableFileAtPath
public abstract boolean isExecutableFileAtPath(NSString path)
isDeletableFileAtPath
public abstract boolean isDeletableFileAtPath(NSString path)
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*)
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*)
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*)
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*)
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*)
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*)
createFileAtPath_contents_attributes
public abstract boolean createFileAtPath_contents_attributes(NSString path,
NSData data,
NSDictionary attr)
fileSystemRepresentationWithPath
public abstract ByteByReference 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*)
stringWithFileSystemRepresentation_length
@Deprecated
public abstract NSString stringWithFileSystemRepresentation_length(ByteByReference str,
int len)
- Deprecated. use the safer method
stringWithFileSystemRepresentation_length(java.lang.String, int)
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)
stringWithFileSystemRepresentation_length
public abstract NSString stringWithFileSystemRepresentation_length(String str,
int 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)
alloc
public static NSFileManager alloc()