/** * @since Available in iOS 6.0 and later. */ public static NSObject observeUbiquityIdentityDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UbiquityIdentityDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.run(); } }); } }
/** * @since Available in iOS 2.0 and later. */ public boolean copyItemAtPath(String srcPath, String dstPath) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = copyItemAtPath(srcPath, dstPath, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 4.0 and later. */ public boolean copyItemAtURL(NSURL srcURL, NSURL dstURL) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = copyItemAtURL(srcURL, dstURL, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 2.0 and later. */ public boolean createDirectoryAtPath(String path, boolean createIntermediates, NSFileAttributes attributes) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createDirectoryAtPath(path, createIntermediates, attributes, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 2.0 and later. */ public boolean createSymbolicLinkAtPath(String path, String destPath) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createSymbolicLinkAtPath(path, destPath, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 2.0 and later. */ public NSFileSystemAttributes getAttributesOfFileSystemAtPath(String path) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); NSFileSystemAttributes result = getAttributesOfFileSystemAtPath(path, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 5.0 and later. */ public boolean createSymbolicLinkAtURL(NSURL url, NSURL destURL) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createSymbolicLinkAtURL(url, destURL, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 5.0 and later. */ public boolean evictUbiquitousItemAtURL(NSURL url) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = evictUbiquitousItemAtURL(url, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
public boolean isDirectoryAtPath(String path) { BooleanPtr ptr = new BooleanPtr(); fileExists(path, ptr); return ptr.get(); }
/** * @since Available in iOS 5.0 and later. */ public boolean createDirectoryAtURL(NSURL url, boolean createIntermediates, NSFileAttributes attributes) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createDirectoryAtURL(url, createIntermediates, attributes, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 2.0 and later. */ public boolean createDirectoryAtPath(String path, boolean createIntermediates, NSFileAttributes attributes) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createDirectoryAtPath(path, createIntermediates, attributes, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 2.0 and later. */ public boolean createSymbolicLinkAtPath(String path, String destPath) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createSymbolicLinkAtPath(path, destPath, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 2.0 and later. */ public NSFileSystemAttributes getAttributesOfFileSystemAtPath(String path) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); NSFileSystemAttributes result = getAttributesOfFileSystemAtPath(path, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 5.0 and later. */ public boolean createSymbolicLinkAtURL(NSURL url, NSURL destURL) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createSymbolicLinkAtURL(url, destURL, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 5.0 and later. */ public boolean evictUbiquitousItemAtURL(NSURL url) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = evictUbiquitousItemAtURL(url, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
public boolean isDirectoryAtPath(String path) { BooleanPtr ptr = new BooleanPtr(); fileExists(path, ptr); return ptr.get(); }
/** * @since Available in iOS 5.0 and later. */ public boolean createDirectoryAtURL(NSURL url, boolean createIntermediates, NSFileAttributes attributes) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createDirectoryAtURL(url, createIntermediates, attributes, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 2.0 and later. */ public boolean createDirectoryAtPath(String path, boolean createIntermediates, NSFileAttributes attributes) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createDirectoryAtPath(path, createIntermediates, attributes, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 2.0 and later. */ public boolean createSymbolicLinkAtPath(String path, String destPath) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = createSymbolicLinkAtPath(path, destPath, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 2.0 and later. */ public boolean copyItemAtPath(String srcPath, String dstPath) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = copyItemAtPath(srcPath, dstPath, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**