Class NSFileManager

  • All Implemented Interfaces:
    NSObject

    public class NSFileManager
    extends NSObject
    • Constructor Detail

      • NSFileManager

        protected NSFileManager​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NSFileManager allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • defaultManager

        @NotNull
        public static @NotNull NSFileManager defaultManager()
        Returns the default singleton instance.
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • URLForDirectoryInDomainAppropriateForURLCreateError

        @Nullable
        public @Nullable NSURL URLForDirectoryInDomainAppropriateForURLCreateError​(long directory,
                                                                                   long domain,
                                                                                   @Nullable
                                                                                   @Nullable NSURL url,
                                                                                   boolean shouldCreate,
                                                                                   @Nullable
                                                                                   @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        -URLForDirectory:inDomain:appropriateForURL:create:error: is a URL-based replacement for FSFindFolder(). It allows for the specification and (optional) creation of a specific directory for a particular purpose (e.g. the replacement of a particular item on disk, or a particular Library directory. You may pass only one of the values from the NSSearchPathDomainMask enumeration, and you may not pass NSAllDomainsMask. API-Since: 4.0
      • URLForPublishingUbiquitousItemAtURLExpirationDateError

        @Nullable
        public @Nullable NSURL URLForPublishingUbiquitousItemAtURLExpirationDateError​(@NotNull
                                                                                      @NotNull NSURL url,
                                                                                      @Nullable
                                                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSDate> outDate,
                                                                                      @Nullable
                                                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Returns a URL that can be shared with other users to allow them download a copy of the specified ubiquitous item. Also returns the date after which the item will no longer be accessible at the returned URL. The URL must be prefixed with a URL from -URLForUbiquityContainerIdentifier:. API-Since: 5.0
      • URLForUbiquityContainerIdentifier

        @Nullable
        public @Nullable NSURL URLForUbiquityContainerIdentifier​(@Nullable
                                                                 @Nullable java.lang.String containerIdentifier)
        Returns a file URL for the root of the ubiquity container directory corresponding to the supplied container ID. Returns nil if the mobile container does not exist or could not be determined. API-Since: 5.0
      • URLsForDirectoryInDomains

        @NotNull
        public @NotNull NSArray<? extends NSURL> URLsForDirectoryInDomains​(long directory,
                                                                           long domainMask)
        -URLsForDirectory:inDomains: is analogous to NSSearchPathForDirectoriesInDomains(), but returns an array of NSURL instances for use with URL-taking APIs. This API is suitable when you need to search for a file or files which may live in one of a variety of locations in the domains specified. API-Since: 4.0
      • attributesOfFileSystemForPathError

        @Nullable
        public @Nullable NSDictionary<java.lang.String,​?> attributesOfFileSystemForPathError​(@NotNull
                                                                                                   @NotNull java.lang.String path,
                                                                                                   @Nullable
                                                                                                   @Nullable org.moe.natj.general.ptr.Ptr<NSError> 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:. API-Since: 2.0
      • attributesOfItemAtPathError

        @Nullable
        public @Nullable NSDictionary<java.lang.String,​?> attributesOfItemAtPathError​(@NotNull
                                                                                            @NotNull java.lang.String path,
                                                                                            @Nullable
                                                                                            @Nullable org.moe.natj.general.ptr.Ptr<NSError> 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:. API-Since: 2.0
      • changeCurrentDirectoryPath

        public boolean changeCurrentDirectoryPath​(@NotNull
                                                  @NotNull java.lang.String path)
      • changeFileAttributesAtPath

        @Deprecated
        public boolean changeFileAttributesAtPath​(@NotNull
                                                  @NotNull NSDictionary<?,​?> attributes,
                                                  @NotNull
                                                  @NotNull java.lang.String path)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -setAttributes:ofItemAtPath:error: instead
      • componentsToDisplayForPath

        @Nullable
        public @Nullable NSArray<java.lang.String> componentsToDisplayForPath​(@NotNull
                                                                              @NotNull java.lang.String 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.
      • containerURLForSecurityApplicationGroupIdentifier

        @Nullable
        public @Nullable NSURL containerURLForSecurityApplicationGroupIdentifier​(@NotNull
                                                                                 @NotNull java.lang.String groupIdentifier)
        Available for OS X in 10.8.3. API-Since: 7.0
      • contentsAtPath

        @Nullable
        public @Nullable NSData contentsAtPath​(@NotNull
                                               @NotNull java.lang.String 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.
      • contentsEqualAtPathAndPath

        public boolean contentsEqualAtPathAndPath​(@NotNull
                                                  @NotNull java.lang.String path1,
                                                  @NotNull
                                                  @NotNull java.lang.String path2)
        -contentsEqualAtPath:andPath: does not take into account data stored in the resource fork or filesystem extended attributes.
      • contentsOfDirectoryAtPathError

        @Nullable
        public @Nullable NSArray<java.lang.String> contentsOfDirectoryAtPathError​(@NotNull
                                                                                  @NotNull java.lang.String path,
                                                                                  @Nullable
                                                                                  @Nullable org.moe.natj.general.ptr.Ptr<NSError> 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: API-Since: 2.0
      • contentsOfDirectoryAtURLIncludingPropertiesForKeysOptionsError

        @Nullable
        public @Nullable NSArray<? extends NSURL> contentsOfDirectoryAtURLIncludingPropertiesForKeysOptionsError​(@NotNull
                                                                                                                 @NotNull NSURL url,
                                                                                                                 @Nullable
                                                                                                                 @Nullable NSArray<java.lang.String> keys,
                                                                                                                 long mask,
                                                                                                                 @Nullable
                                                                                                                 @Nullable org.moe.natj.general.ptr.Ptr<NSError> 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'. API-Since: 4.0
      • copyItemAtPathToPathError

        public boolean copyItemAtPathToPathError​(@NotNull
                                                 @NotNull java.lang.String srcPath,
                                                 @NotNull
                                                 @NotNull java.lang.String dstPath,
                                                 @Nullable
                                                 @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        These methods replace their non-error returning counterparts below. See the NSFileManagerDelegate protocol below for methods that are dispatched to the NSFileManager instance's delegate. API-Since: 2.0
      • copyItemAtURLToURLError

        public boolean copyItemAtURLToURLError​(@NotNull
                                               @NotNull NSURL srcURL,
                                               @NotNull
                                               @NotNull NSURL dstURL,
                                               @Nullable
                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        These methods are URL-taking equivalents of the four methods above. Their delegate methods are defined in the NSFileManagerDelegate protocol below. API-Since: 4.0
      • createDirectoryAtPathAttributes

        @Deprecated
        public boolean createDirectoryAtPathAttributes​(@NotNull
                                                       @NotNull java.lang.String path,
                                                       @NotNull
                                                       @NotNull NSDictionary<?,​?> attributes)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -createDirectoryAtPath:withIntermediateDirectories:attributes:error: instead
      • createDirectoryAtPathWithIntermediateDirectoriesAttributesError

        public boolean createDirectoryAtPathWithIntermediateDirectoriesAttributesError​(@NotNull
                                                                                       @NotNull java.lang.String path,
                                                                                       boolean createIntermediates,
                                                                                       @Nullable
                                                                                       @Nullable NSDictionary<java.lang.String,​?> attributes,
                                                                                       @Nullable
                                                                                       @Nullable org.moe.natj.general.ptr.Ptr<NSError> 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: API-Since: 2.0
      • createDirectoryAtURLWithIntermediateDirectoriesAttributesError

        public boolean createDirectoryAtURLWithIntermediateDirectoriesAttributesError​(@NotNull
                                                                                      @NotNull NSURL url,
                                                                                      boolean createIntermediates,
                                                                                      @Nullable
                                                                                      @Nullable NSDictionary<java.lang.String,​?> attributes,
                                                                                      @Nullable
                                                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        createDirectoryAtURL:withIntermediateDirectories:attributes:error: creates a directory at the specified URL. If you pass 'NO' for withIntermediateDirectories, the directory must not exist at the time this call is made. Passing 'YES' for withIntermediateDirectories will create any necessary intermediate directories. This method returns YES if all directories specified in 'url' 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. API-Since: 5.0
      • createFileAtPathContentsAttributes

        public boolean createFileAtPathContentsAttributes​(@NotNull
                                                          @NotNull java.lang.String path,
                                                          @Nullable
                                                          @Nullable NSData data,
                                                          @Nullable
                                                          @Nullable NSDictionary<java.lang.String,​?> attr)
      • createSymbolicLinkAtPathPathContent

        @Deprecated
        public boolean createSymbolicLinkAtPathPathContent​(@NotNull
                                                           @NotNull java.lang.String path,
                                                           @NotNull
                                                           @NotNull java.lang.String otherpath)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -createSymbolicLinkAtPath:error: instead
      • createSymbolicLinkAtPathWithDestinationPathError

        public boolean createSymbolicLinkAtPathWithDestinationPathError​(@NotNull
                                                                        @NotNull java.lang.String path,
                                                                        @NotNull
                                                                        @NotNull java.lang.String destPath,
                                                                        @Nullable
                                                                        @Nullable org.moe.natj.general.ptr.Ptr<NSError> 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: API-Since: 2.0
      • createSymbolicLinkAtURLWithDestinationURLError

        public boolean createSymbolicLinkAtURLWithDestinationURLError​(@NotNull
                                                                      @NotNull NSURL url,
                                                                      @NotNull
                                                                      @NotNull NSURL destURL,
                                                                      @Nullable
                                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        createSymbolicLinkAtURL:withDestinationURL:error: returns YES if the symbolic link that point at 'destURL' was able to be created at the location specified by 'url'. 'destURL' is always resolved against its base URL, if it has one. If 'destURL' has no base URL and it's 'relativePath' is indeed a relative path, then a relative symlink will be created. 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. API-Since: 5.0
      • currentDirectoryPath

        @NotNull
        public @NotNull java.lang.String 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.
      • delegate

        @Nullable
        public @Nullable NSFileManagerDelegate 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. API-Since: 2.0
      • destinationOfSymbolicLinkAtPathError

        @Nullable
        public @Nullable java.lang.String destinationOfSymbolicLinkAtPathError​(@NotNull
                                                                               @NotNull java.lang.String path,
                                                                               @Nullable
                                                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> 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: API-Since: 2.0
      • directoryContentsAtPath

        @Nullable
        @Deprecated
        public @Nullable NSArray<?> directoryContentsAtPath​(@NotNull
                                                            @NotNull java.lang.String path)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -contentsOfDirectoryAtPath:error: instead
      • displayNameAtPath

        @NotNull
        public @NotNull java.lang.String displayNameAtPath​(@NotNull
                                                           @NotNull java.lang.String 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.
      • enumeratorAtPath

        @Nullable
        public @Nullable NSDirectoryEnumerator<java.lang.String> enumeratorAtPath​(@NotNull
                                                                                  @NotNull java.lang.String 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.
      • enumeratorAtURLIncludingPropertiesForKeysOptionsErrorHandler

        @Nullable
        public @Nullable NSDirectoryEnumerator<NSURL> enumeratorAtURLIncludingPropertiesForKeysOptionsErrorHandler​(@NotNull
                                                                                                                   @NotNull NSURL url,
                                                                                                                   @Nullable
                                                                                                                   @Nullable NSArray<java.lang.String> keys,
                                                                                                                   long mask,
                                                                                                                   @Nullable
                                                                                                                   @Nullable NSFileManager.Block_enumeratorAtURLIncludingPropertiesForKeysOptionsErrorHandler handler)
        enumeratorAtURL:includingPropertiesForKeys:options:errorHandler: returns an NSDirectoryEnumerator rooted at the provided directory URL. The NSDirectoryEnumerator returns NSURLs from the -nextObject method. The optional 'includingPropertiesForKeys' parameter indicates which resource properties should be pre-fetched and cached with each enumerated URL. The optional 'errorHandler' block argument is invoked when an error occurs. Parameters to the block are the URL on which an error occurred and the error. When the error handler returns YES, enumeration continues if possible. Enumeration stops immediately when the error handler returns NO. 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'. API-Since: 4.0
      • evictUbiquitousItemAtURLError

        public boolean evictUbiquitousItemAtURLError​(@NotNull
                                                     @NotNull NSURL url,
                                                     @Nullable
                                                     @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Removes the local instance of the ubiquitous item at the given URL. Returns YES if removal was successful, NO otherwise. API-Since: 5.0
      • fileAttributesAtPathTraverseLink

        @Nullable
        @Deprecated
        public @Nullable NSDictionary<?,​?> fileAttributesAtPathTraverseLink​(@NotNull
                                                                                  @NotNull java.lang.String path,
                                                                                  boolean yorn)
        Deprecated.
        The following methods are deprecated on Mac OS X 10.5. Their URL-based and/or error-returning replacements are listed above. API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -attributesOfItemAtPath:error: instead
      • fileExistsAtPath

        public boolean fileExistsAtPath​(@NotNull
                                        @NotNull java.lang.String 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.
      • fileExistsAtPathIsDirectory

        public boolean fileExistsAtPathIsDirectory​(@NotNull
                                                   @NotNull java.lang.String path,
                                                   @Nullable
                                                   @Nullable org.moe.natj.general.ptr.BoolPtr isDirectory)
      • fileSystemAttributesAtPath

        @Nullable
        @Deprecated
        public @Nullable NSDictionary<?,​?> fileSystemAttributesAtPath​(@NotNull
                                                                            @NotNull java.lang.String path)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -attributesOfFileSystemForPath:error: instead
      • fileSystemRepresentationWithPath

        @NotNull
        public @NotNull java.lang.String fileSystemRepresentationWithPath​(@NotNull
                                                                          @NotNull java.lang.String 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.
      • getRelationshipOfDirectoryInDomainToItemAtURLError

        public boolean getRelationshipOfDirectoryInDomainToItemAtURLError​(@NotNull
                                                                          @NotNull org.moe.natj.general.ptr.NIntPtr outRelationship,
                                                                          long directory,
                                                                          long domainMask,
                                                                          @NotNull
                                                                          @NotNull NSURL url,
                                                                          @Nullable
                                                                          @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Similar to -[NSFileManager getRelationship:ofDirectoryAtURL:toItemAtURL:error:], except that the directory is instead defined by an NSSearchPathDirectory and NSSearchPathDomainMask. Pass 0 for domainMask to instruct the method to automatically choose the domain appropriate for 'url'. For example, to discover if a file is contained by a Trash directory, call [fileManager getRelationship:&result ofDirectory:NSTrashDirectory inDomain:0 toItemAtURL:url error:&error]. API-Since: 8.0
      • getRelationshipOfDirectoryAtURLToItemAtURLError

        public boolean getRelationshipOfDirectoryAtURLToItemAtURLError​(@NotNull
                                                                       @NotNull org.moe.natj.general.ptr.NIntPtr outRelationship,
                                                                       @NotNull
                                                                       @NotNull NSURL directoryURL,
                                                                       @NotNull
                                                                       @NotNull NSURL otherURL,
                                                                       @Nullable
                                                                       @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Sets 'outRelationship' to NSURLRelationshipContains if the directory at 'directoryURL' directly or indirectly contains the item at 'otherURL', meaning 'directoryURL' is found while enumerating parent URLs starting from 'otherURL'. Sets 'outRelationship' to NSURLRelationshipSame if 'directoryURL' and 'otherURL' locate the same item, meaning they have the same NSURLFileResourceIdentifierKey value. If 'directoryURL' is not a directory, or does not contain 'otherURL' and they do not locate the same file, then sets 'outRelationship' to NSURLRelationshipOther. If an error occurs, returns NO and sets 'error'. API-Since: 8.0
      • isDeletableFileAtPath

        public boolean isDeletableFileAtPath​(@NotNull
                                             @NotNull java.lang.String path)
      • isExecutableFileAtPath

        public boolean isExecutableFileAtPath​(@NotNull
                                              @NotNull java.lang.String path)
      • isReadableFileAtPath

        public boolean isReadableFileAtPath​(@NotNull
                                            @NotNull java.lang.String path)
      • isUbiquitousItemAtURL

        public boolean isUbiquitousItemAtURL​(@NotNull
                                             @NotNull NSURL url)
        Returns YES if the item for the specified URL is ubiquitous, NO otherwise. API-Since: 5.0
      • isWritableFileAtPath

        public boolean isWritableFileAtPath​(@NotNull
                                            @NotNull java.lang.String path)
      • linkItemAtPathToPathError

        public boolean linkItemAtPathToPathError​(@NotNull
                                                 @NotNull java.lang.String srcPath,
                                                 @NotNull
                                                 @NotNull java.lang.String dstPath,
                                                 @Nullable
                                                 @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 2.0
      • linkItemAtURLToURLError

        public boolean linkItemAtURLToURLError​(@NotNull
                                               @NotNull NSURL srcURL,
                                               @NotNull
                                               @NotNull NSURL dstURL,
                                               @Nullable
                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 4.0
      • mountedVolumeURLsIncludingResourceValuesForKeysOptions

        @Nullable
        public @Nullable NSArray<? extends NSURL> mountedVolumeURLsIncludingResourceValuesForKeysOptions​(@Nullable
                                                                                                         @Nullable NSArray<java.lang.String> propertyKeys,
                                                                                                         long 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 . API-Since: 4.0
      • moveItemAtPathToPathError

        public boolean moveItemAtPathToPathError​(@NotNull
                                                 @NotNull java.lang.String srcPath,
                                                 @NotNull
                                                 @NotNull java.lang.String dstPath,
                                                 @Nullable
                                                 @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 2.0
      • moveItemAtURLToURLError

        public boolean moveItemAtURLToURLError​(@NotNull
                                               @NotNull NSURL srcURL,
                                               @NotNull
                                               @NotNull NSURL dstURL,
                                               @Nullable
                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 4.0
      • pathContentOfSymbolicLinkAtPath

        @Nullable
        @Deprecated
        public @Nullable java.lang.String pathContentOfSymbolicLinkAtPath​(@NotNull
                                                                          @NotNull java.lang.String path)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 2.0 Deprecated-Message: Use -destinationOfSymbolicLinkAtPath:error:
      • removeItemAtPathError

        public boolean removeItemAtPathError​(@NotNull
                                             @NotNull java.lang.String path,
                                             @Nullable
                                             @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 2.0
      • removeItemAtURLError

        public boolean removeItemAtURLError​(@NotNull
                                            @NotNull NSURL URL,
                                            @Nullable
                                            @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        API-Since: 4.0
      • replaceItemAtURLWithItemAtURLBackupItemNameOptionsResultingItemURLError

        public boolean replaceItemAtURLWithItemAtURLBackupItemNameOptionsResultingItemURLError​(@NotNull
                                                                                               @NotNull NSURL originalItemURL,
                                                                                               @NotNull
                                                                                               @NotNull NSURL newItemURL,
                                                                                               @Nullable
                                                                                               @Nullable java.lang.String backupItemName,
                                                                                               long options,
                                                                                               @Nullable
                                                                                               @Nullable org.moe.natj.general.ptr.Ptr<NSURL> resultingURL,
                                                                                               @Nullable
                                                                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> 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. API-Since: 4.0
      • setAttributesOfItemAtPathError

        public boolean setAttributesOfItemAtPathError​(@NotNull
                                                      @NotNull NSDictionary<java.lang.String,​?> attributes,
                                                      @NotNull
                                                      @NotNull java.lang.String path,
                                                      @Nullable
                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSError> 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:. API-Since: 2.0
      • setDelegate_unsafe

        public void setDelegate_unsafe​(@Nullable
                                       @Nullable NSFileManagerDelegate value)
        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. API-Since: 2.0
      • setDelegate

        public void setDelegate​(@Nullable
                                @Nullable NSFileManagerDelegate value)
        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. API-Since: 2.0
      • setUbiquitousItemAtURLDestinationURLError

        public boolean setUbiquitousItemAtURLDestinationURLError​(boolean flag,
                                                                 @NotNull
                                                                 @NotNull NSURL url,
                                                                 @NotNull
                                                                 @NotNull NSURL destinationURL,
                                                                 @Nullable
                                                                 @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Changes whether the item for the specified URL is ubiquitous and moves the item to the destination URL. When making an item ubiquitous, the destination URL must be prefixed with a URL from -URLForUbiquityContainerIdentifier:. Returns YES if the change is successful, NO otherwise. API-Since: 5.0
      • startDownloadingUbiquitousItemAtURLError

        public boolean startDownloadingUbiquitousItemAtURLError​(@NotNull
                                                                @NotNull NSURL url,
                                                                @Nullable
                                                                @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Start downloading a local instance of the specified ubiquitous item, if necessary. Returns YES if the download started successfully or wasn't necessary, NO otherwise. API-Since: 5.0
      • stringWithFileSystemRepresentationLength

        @NotNull
        public @NotNull java.lang.String stringWithFileSystemRepresentationLength​(@NotNull
                                                                                  @NotNull org.moe.natj.general.ptr.ConstBytePtr str,
                                                                                  long len)
        stringWithFileSystemRepresentation:length: returns an NSString created from an array of bytes that are in the filesystem representation.
      • subpathsAtPath

        @Nullable
        public @Nullable NSArray<java.lang.String> subpathsAtPath​(@NotNull
                                                                  @NotNull java.lang.String 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.
      • subpathsOfDirectoryAtPathError

        @Nullable
        public @Nullable NSArray<java.lang.String> subpathsOfDirectoryAtPathError​(@NotNull
                                                                                  @NotNull java.lang.String path,
                                                                                  @Nullable
                                                                                  @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        subpathsOfDirectoryAtPath:error: returns an NSArray of NSStrings representing 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: API-Since: 2.0
      • temporaryDirectory

        @NotNull
        public @NotNull NSURL temporaryDirectory()
        API-Since: 10.0
      • ubiquityIdentityToken

        @Nullable
        public @Nullable java.lang.Object ubiquityIdentityToken()
        Returns an opaque token that represents the current ubiquity identity. This object can be copied, encoded, or compared with isEqual:. When ubiquity containers are unavailable because the user has disabled them, or when the user is simply not logged in, this method will return nil. The NSUbiquityIdentityDidChangeNotification notification is posted after this value changes. If you don't need the container URL and just want to check if ubiquity containers are available you should use this method instead of checking -URLForUbiquityContainerIdentifier:. API-Since: 6.0
      • getFileProviderServicesForItemAtURLCompletionHandler

        public void getFileProviderServicesForItemAtURLCompletionHandler​(@NotNull
                                                                         @NotNull NSURL url,
                                                                         @NotNull
                                                                         @NotNull NSFileManager.Block_getFileProviderServicesForItemAtURLCompletionHandler completionHandler)
        Asynchronously returns a dictionary of zero or more NSFileProviderService instances, which enable your application to instruct the file's provider to take various actions on or with regards to the given URL. To do this, first identify an NSFileProviderService object whose name matches the service you wish to use. Then get an NSXPCConnection from it and set up its NSXPCInterface with the protocol that matches the service's name. You'll need to refer to external documentation or an SDK supplied by the provider to get this information. Once an NSXPCConnection is obtained, you must finish configuring it and send it -resume. Failure to do so will result in leaking system resources. API-Since: 11.0
      • trashItemAtURLResultingItemURLError

        public boolean trashItemAtURLResultingItemURLError​(@NotNull
                                                           @NotNull NSURL url,
                                                           @Nullable
                                                           @Nullable org.moe.natj.general.ptr.Ptr<NSURL> outResultingURL,
                                                           @Nullable
                                                           @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        trashItemAtURL:resultingItemURL:error: returns YES if the item at 'url' was successfully moved to a Trash. Since the operation may require renaming the file to avoid collisions, it also returns by reference the resulting URL that the item was moved to. If this method returns NO, the item was not moved and an NSError will be returned by reference in the 'error' parameter. To easily discover if an item is in the Trash, you may use [fileManager getRelationship:&result ofDirectory:NSTrashDirectory inDomain:0 toItemAtURL:url error:&error] && result == NSURLRelationshipContains. API-Since: 11.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.