Package org.robovm.apple.foundation
Class NSFileManager
- java.lang.Object
-
- org.robovm.rt.bro.NativeObject
-
- org.robovm.objc.ObjCObject
-
- org.robovm.apple.foundation.NSObject
-
- org.robovm.apple.foundation.NSFileManager
-
- All Implemented Interfaces:
NSObjectProtocol
,org.robovm.objc.ObjCProtocol
public class NSFileManager extends NSObject
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSFileManager.Notifications
static class
NSFileManager.NSFileManagerPtr
-
Nested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInit
-
-
Field Summary
-
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAIN
-
-
Constructor Summary
Constructors Modifier Constructor Description NSFileManager()
protected
NSFileManager(NSObject.Handle h, long handle)
protected
NSFileManager(NSObject.SkipInit skipInit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
changeCurrentDirectoryPath(java.lang.String path)
boolean
contentsAtPathEqual(java.lang.String path1, java.lang.String path2)
boolean
copyItemAtPath(java.lang.String srcPath, java.lang.String dstPath)
boolean
copyItemAtURL(NSURL srcURL, NSURL dstURL)
boolean
createDirectoryAtPath(java.lang.String path, boolean createIntermediates, NSFileAttributes attributes)
boolean
createDirectoryAtURL(NSURL url, boolean createIntermediates, NSFileAttributes attributes)
boolean
createFileAtPath(java.lang.String path, NSData data, NSFileAttributes attr)
boolean
createSymbolicLinkAtPath(java.lang.String path, java.lang.String destPath)
boolean
createSymbolicLinkAtURL(NSURL url, NSURL destURL)
boolean
evictUbiquitousItemAtURL(NSURL url)
boolean
fileExists(java.lang.String path)
protected boolean
fileExists(java.lang.String path, org.robovm.rt.bro.ptr.BooleanPtr isDirectory)
boolean
fileIsDeletable(java.lang.String path)
boolean
fileIsExecutable(java.lang.String path)
boolean
fileIsReadable(java.lang.String path)
boolean
fileIsWritable(java.lang.String path)
NSFileSystemAttributes
getAttributesOfFileSystemAtPath(java.lang.String path)
NSFileAttributes
getAttributesOfItemAtPath(java.lang.String path)
java.util.List<java.lang.String>
getComponentsToDisplayForPath(java.lang.String path)
NSURL
getContainerURLForSecurityApplication(java.lang.String groupIdentifier)
NSData
getContentsAtPath(java.lang.String path)
NSArray<NSURL>
getContentsOfDirectoryAtPath(java.lang.String path)
NSArray<NSURL>
getContentsOfDirectoryAtURL(NSURL url, java.util.List<NSURLFileSystemProperty> keys, NSDirectoryEnumerationOptions mask)
java.lang.String
getCurrentDirectoryPath()
static NSFileManager
getDefaultManager()
NSFileManagerDelegate
getDelegate()
java.lang.String
getDestinationOfSymbolicLinkAtPath(java.lang.String path)
java.lang.String
getDisplayNameAtPath(java.lang.String path)
NSDirectoryEnumerator<NSString>
getEnumeratorAtPath(java.lang.String path)
protected NSDirectoryEnumerator
getEnumeratorAtURL(NSURL url, java.util.List<NSURLFileSystemProperty> keys, NSDirectoryEnumerationOptions mask, org.robovm.objc.block.Block2<NSURL,NSError,java.lang.Boolean> handler)
void
getFileProviderServicesForItemAtURL(NSURL url, org.robovm.objc.block.VoidBlock2<NSDictionary<NSString,NSFileProviderService>,NSError> completionHandler)
java.lang.String
getFileSystemRepresentationForPath(java.lang.String path)
protected NSArray<NSURL>
getMountedVolumeURLsIncludingResourceValues(java.util.List<NSURLFileSystemProperty> propertyKeys, NSVolumeEnumerationOptions options)
java.lang.String
getPathForFileSystemRepresentation(org.robovm.rt.bro.ptr.BytePtr str, long len)
NSURLRelationship
getRelationshipOfDirectoryToItem(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, NSURL url)
NSURLRelationship
getRelationshipOfDirectoryToItem(NSURL directoryURL, NSURL otherURL)
protected boolean
getRelationshipOfDirectoryToItem(org.robovm.rt.bro.ptr.MachineSizedSIntPtr outRelationship, NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, NSURL url)
protected boolean
getRelationshipOfDirectoryToItem(org.robovm.rt.bro.ptr.MachineSizedSIntPtr outRelationship, NSURL directoryURL, NSURL otherURL)
java.util.List<java.lang.String>
getSubpathsAtPath(java.lang.String path)
java.util.List<java.lang.String>
getSubpathsOfDirectoryAtPath(java.lang.String path)
NSURL
getTemporaryDirectory()
NSObject
getUbiquityIdentityToken()
NSURL
getURLForDirectory(NSSearchPathDirectory directory, NSSearchPathDomainMask domain, NSURL url, boolean shouldCreate)
NSURL
getURLForPublishingUbiquitousItemAtURL(NSURL url, NSDate.NSDatePtr outDate)
NSURL
getURLForUbiquityContainerIdentifier(java.lang.String containerIdentifier)
NSArray<NSURL>
getURLsForDirectory(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask)
boolean
isDirectoryAtPath(java.lang.String path)
boolean
isUbiquitousItemAtURL(NSURL url)
boolean
linkItemAtPath(java.lang.String srcPath, java.lang.String dstPath)
boolean
linkItemAtURL(NSURL srcURL, NSURL dstURL)
boolean
moveItemAtPath(java.lang.String srcPath, java.lang.String dstPath)
boolean
moveItemAtURL(NSURL srcURL, NSURL dstURL)
boolean
removeItemAtPath(java.lang.String path)
boolean
removeItemAtURL(NSURL URL)
boolean
replaceItemAtURL(NSURL originalItemURL, NSURL newItemURL, java.lang.String backupItemName, NSFileManagerItemReplacementOptions options, NSURL.NSURLPtr resultingURL)
boolean
setAttributesForItem(NSFileAttributes attributes, java.lang.String path)
void
setDelegate(NSFileManagerDelegate v)
boolean
setUbiquitousItemAtURL(boolean flag, NSURL url, NSURL destinationURL)
boolean
startDownloadingUbiquitousItemAtURL(NSURL url)
boolean
trashItemAtURL(NSURL url, NSURL.NSURLPtr outResultingURL)
static NSString
UbiquityIdentityDidChangeNotification()
-
Methods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValues
-
-
-
-
Constructor Detail
-
NSFileManager
public NSFileManager()
-
NSFileManager
protected NSFileManager(NSObject.Handle h, long handle)
-
NSFileManager
protected NSFileManager(NSObject.SkipInit skipInit)
-
-
Method Detail
-
getDefaultManager
public static NSFileManager getDefaultManager()
-
getDelegate
public NSFileManagerDelegate getDelegate()
- Since:
- Available in iOS 2.0 and later.
-
setDelegate
public void setDelegate(NSFileManagerDelegate v)
- Since:
- Available in iOS 2.0 and later.
-
getCurrentDirectoryPath
public java.lang.String getCurrentDirectoryPath()
-
getUbiquityIdentityToken
public NSObject getUbiquityIdentityToken()
- Since:
- Available in iOS 6.0 and later.
-
getTemporaryDirectory
public NSURL getTemporaryDirectory()
- Since:
- Available in iOS 10.0 and later.
-
isDirectoryAtPath
public boolean isDirectoryAtPath(java.lang.String path)
-
getRelationshipOfDirectoryToItem
public NSURLRelationship getRelationshipOfDirectoryToItem(NSURL directoryURL, NSURL otherURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 8.0 and later.
-
getRelationshipOfDirectoryToItem
public NSURLRelationship getRelationshipOfDirectoryToItem(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, NSURL url) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 8.0 and later.
-
UbiquityIdentityDidChangeNotification
public static NSString UbiquityIdentityDidChangeNotification()
- Since:
- Available in iOS 6.0 and later.
-
getMountedVolumeURLsIncludingResourceValues
protected NSArray<NSURL> getMountedVolumeURLsIncludingResourceValues(java.util.List<NSURLFileSystemProperty> propertyKeys, NSVolumeEnumerationOptions options)
- Since:
- Available in iOS 4.0 and later.
-
getContentsOfDirectoryAtURL
public NSArray<NSURL> getContentsOfDirectoryAtURL(NSURL url, java.util.List<NSURLFileSystemProperty> keys, NSDirectoryEnumerationOptions mask) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
getURLsForDirectory
public NSArray<NSURL> getURLsForDirectory(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask)
- Since:
- Available in iOS 4.0 and later.
-
getURLForDirectory
public NSURL getURLForDirectory(NSSearchPathDirectory directory, NSSearchPathDomainMask domain, NSURL url, boolean shouldCreate) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
getRelationshipOfDirectoryToItem
protected boolean getRelationshipOfDirectoryToItem(org.robovm.rt.bro.ptr.MachineSizedSIntPtr outRelationship, NSURL directoryURL, NSURL otherURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 8.0 and later.
-
getRelationshipOfDirectoryToItem
protected boolean getRelationshipOfDirectoryToItem(org.robovm.rt.bro.ptr.MachineSizedSIntPtr outRelationship, NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, NSURL url) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 8.0 and later.
-
createDirectoryAtURL
public boolean createDirectoryAtURL(NSURL url, boolean createIntermediates, NSFileAttributes attributes) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 5.0 and later.
-
createSymbolicLinkAtURL
public boolean createSymbolicLinkAtURL(NSURL url, NSURL destURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 5.0 and later.
-
setAttributesForItem
public boolean setAttributesForItem(NSFileAttributes attributes, java.lang.String path) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
createDirectoryAtPath
public boolean createDirectoryAtPath(java.lang.String path, boolean createIntermediates, NSFileAttributes attributes) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
getContentsOfDirectoryAtPath
public NSArray<NSURL> getContentsOfDirectoryAtPath(java.lang.String path) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
getSubpathsOfDirectoryAtPath
public java.util.List<java.lang.String> getSubpathsOfDirectoryAtPath(java.lang.String path) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
getAttributesOfItemAtPath
public NSFileAttributes getAttributesOfItemAtPath(java.lang.String path) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
getAttributesOfFileSystemAtPath
public NSFileSystemAttributes getAttributesOfFileSystemAtPath(java.lang.String path) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
createSymbolicLinkAtPath
public boolean createSymbolicLinkAtPath(java.lang.String path, java.lang.String destPath) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
getDestinationOfSymbolicLinkAtPath
public java.lang.String getDestinationOfSymbolicLinkAtPath(java.lang.String path) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
copyItemAtPath
public boolean copyItemAtPath(java.lang.String srcPath, java.lang.String dstPath) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
moveItemAtPath
public boolean moveItemAtPath(java.lang.String srcPath, java.lang.String dstPath) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
linkItemAtPath
public boolean linkItemAtPath(java.lang.String srcPath, java.lang.String dstPath) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
removeItemAtPath
public boolean removeItemAtPath(java.lang.String path) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 2.0 and later.
-
copyItemAtURL
public boolean copyItemAtURL(NSURL srcURL, NSURL dstURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
moveItemAtURL
public boolean moveItemAtURL(NSURL srcURL, NSURL dstURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
linkItemAtURL
public boolean linkItemAtURL(NSURL srcURL, NSURL dstURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
removeItemAtURL
public boolean removeItemAtURL(NSURL URL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
trashItemAtURL
public boolean trashItemAtURL(NSURL url, NSURL.NSURLPtr outResultingURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 11.0 and later.
-
changeCurrentDirectoryPath
public boolean changeCurrentDirectoryPath(java.lang.String path)
-
fileExists
public boolean fileExists(java.lang.String path)
-
fileExists
protected boolean fileExists(java.lang.String path, org.robovm.rt.bro.ptr.BooleanPtr isDirectory)
-
fileIsReadable
public boolean fileIsReadable(java.lang.String path)
-
fileIsWritable
public boolean fileIsWritable(java.lang.String path)
-
fileIsExecutable
public boolean fileIsExecutable(java.lang.String path)
-
fileIsDeletable
public boolean fileIsDeletable(java.lang.String path)
-
contentsAtPathEqual
public boolean contentsAtPathEqual(java.lang.String path1, java.lang.String path2)
-
getDisplayNameAtPath
public java.lang.String getDisplayNameAtPath(java.lang.String path)
-
getComponentsToDisplayForPath
public java.util.List<java.lang.String> getComponentsToDisplayForPath(java.lang.String path)
-
getEnumeratorAtPath
public NSDirectoryEnumerator<NSString> getEnumeratorAtPath(java.lang.String path)
-
getEnumeratorAtURL
protected NSDirectoryEnumerator getEnumeratorAtURL(NSURL url, java.util.List<NSURLFileSystemProperty> keys, NSDirectoryEnumerationOptions mask, org.robovm.objc.block.Block2<NSURL,NSError,java.lang.Boolean> handler)
- Since:
- Available in iOS 4.0 and later.
-
getSubpathsAtPath
public java.util.List<java.lang.String> getSubpathsAtPath(java.lang.String path)
-
getContentsAtPath
public NSData getContentsAtPath(java.lang.String path)
-
createFileAtPath
public boolean createFileAtPath(java.lang.String path, NSData data, NSFileAttributes attr)
-
getFileSystemRepresentationForPath
public java.lang.String getFileSystemRepresentationForPath(java.lang.String path)
-
getPathForFileSystemRepresentation
public java.lang.String getPathForFileSystemRepresentation(org.robovm.rt.bro.ptr.BytePtr str, long len)
-
replaceItemAtURL
public boolean replaceItemAtURL(NSURL originalItemURL, NSURL newItemURL, java.lang.String backupItemName, NSFileManagerItemReplacementOptions options, NSURL.NSURLPtr resultingURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
setUbiquitousItemAtURL
public boolean setUbiquitousItemAtURL(boolean flag, NSURL url, NSURL destinationURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 5.0 and later.
-
isUbiquitousItemAtURL
public boolean isUbiquitousItemAtURL(NSURL url)
- Since:
- Available in iOS 5.0 and later.
-
startDownloadingUbiquitousItemAtURL
public boolean startDownloadingUbiquitousItemAtURL(NSURL url) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 5.0 and later.
-
evictUbiquitousItemAtURL
public boolean evictUbiquitousItemAtURL(NSURL url) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 5.0 and later.
-
getURLForUbiquityContainerIdentifier
public NSURL getURLForUbiquityContainerIdentifier(java.lang.String containerIdentifier)
- Since:
- Available in iOS 5.0 and later.
-
getURLForPublishingUbiquitousItemAtURL
public NSURL getURLForPublishingUbiquitousItemAtURL(NSURL url, NSDate.NSDatePtr outDate) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 5.0 and later.
-
getFileProviderServicesForItemAtURL
public void getFileProviderServicesForItemAtURL(NSURL url, org.robovm.objc.block.VoidBlock2<NSDictionary<NSString,NSFileProviderService>,NSError> completionHandler)
- Since:
- Available in iOS 11.0 and later.
-
getContainerURLForSecurityApplication
public NSURL getContainerURLForSecurityApplication(java.lang.String groupIdentifier)
- Since:
- Available in iOS 7.0 and later.
-
-