public class NSFileVersion extends NSObject
| Modifier and Type | Class and Description |
|---|---|
static interface |
NSFileVersion.Block_getNonlocalVersionsOfItemAtURLCompletionHandler |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NSFileVersion(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static NSFileVersion |
alloc() |
static NSFileVersion |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static NSFileVersion |
currentVersionOfItemAtURL(NSURL url)
Return an NSFileVersion that represents the contents of the file located by a URL, or nil if there is no such file.
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
static void |
getNonlocalVersionsOfItemAtURLCompletionHandler(NSURL url,
NSFileVersion.Block_getNonlocalVersionsOfItemAtURLCompletionHandler completionHandler)
Asynchronously return an array of NSFileVersions associated with the file located by the given URL, or nil if there is no such file or another error occurs.
|
static long |
hash_static() |
boolean |
hasLocalContents()
Whether the version has local contents.
|
boolean |
hasThumbnail()
Whether the version has a thumbnail image available.
|
NSFileVersion |
init() |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isConflict()
Whether the version was created as a result of the discovery of a conflict between two writers of the versioned file.
|
boolean |
isResolved()
If the version is a conflict version, whether the conflict has been resolved.
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
java.lang.String |
localizedName()
The user-presentable name of the version, or possibly nil if the receiver's storage has been deleted.
|
java.lang.String |
localizedNameOfSavingComputer()
The user-presentable name of the computer on which the version was saved, or possibly nil if the receiver's storage has been deleted, or nil if no computer name was recorded.
|
NSDate |
modificationDate()
The modification date of the version, or possibly nil if the receiver's storage has been deleted.
|
static NSFileVersion |
new_objc() |
NSPersonNameComponents |
originatorNameComponents()
The name components of the user who created this version of the file.
|
static NSArray<? extends NSFileVersion> |
otherVersionsOfItemAtURL(NSURL url)
Return an array of NSFileVersions associated with the file located by a URL, or nil if there is no such file.
|
NSCoding |
persistentIdentifier()
An object that can be encoded and, after subsequent decoding, passed to -versionOfItemAtURL:forPersistentIdentifier: to create a new instance of NSFileVersion that is equal to the receiver.
|
boolean |
removeAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> outError)
Delete the receiver's storage, and return YES if successful.
|
static boolean |
removeOtherVersionsOfItemAtURLError(NSURL url,
org.moe.natj.general.ptr.Ptr<NSError> outError)
Delete all of the versions associated with the file located by a URL, except for the current one, and return YES if successful.
|
NSURL |
replaceItemAtURLOptionsError(NSURL url,
long options,
org.moe.natj.general.ptr.Ptr<NSError> error)
If the passed-in URL locates a file, replace the file with a file whose contents are taken from the version but whose display name is taken from the file.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setResolved(boolean value)
If the version is a conflict version, whether the conflict has been resolved.
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
static NSArray<? extends NSFileVersion> |
unresolvedConflictVersionsOfItemAtURL(NSURL url)
Return an array of NSFileVersions that represent unresolved conflicts for the file located by a URL, or nil if there is no such file.
|
NSURL |
URL()
The location of the receiver's storage, or possibly nil if the receiver's storage has been deleted.
|
static long |
version_static() |
static NSFileVersion |
versionOfItemAtURLForPersistentIdentifier(NSURL url,
java.lang.Object persistentIdentifier)
For a file located by a URL, return the NSFileVersion identified by a persistent identifier of the sort returned by -persistentIdentifier, or nil if the version no longer exists.
|
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static NSFileVersion alloc()
public static NSFileVersion allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static NSFileVersion currentVersionOfItemAtURL(NSURL url)
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static void getNonlocalVersionsOfItemAtURLCompletionHandler(NSURL url, NSFileVersion.Block_getNonlocalVersionsOfItemAtURLCompletionHandler completionHandler)
When a version is successfully downloaded, its contents are cached locally, and the version will no longer be returned by this method. The version will be returned by +[NSFileVersion otherVersionsOfItemAtURL:] instead, but will retain the same persistentIdentifier value. If the local version is later discarded, future invocations of this method may resume returning the version.
If you need to get all versions for a document, both local and non-local, you should use an NSFilePresenter that implements -presentedItemDidGainVersion: and -presentedItemDidLoseVersion: and invoke +[NSFileCoordinator addFilePresenter:], +[NSFileVersion otherVersionsOfItemAtURL:], and this method within a single coordinated read.
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static NSFileVersion new_objc()
public static NSArray<? extends NSFileVersion> otherVersionsOfItemAtURL(NSURL url)
public static boolean removeOtherVersionsOfItemAtURLError(NSURL url, org.moe.natj.general.ptr.Ptr<NSError> outError)
When removing versions of a file you should do it as part of a coordinated write to the file. The advice about this for +addVersionOfItemAtURL:withContentsOfURL:options:error: applies here too.
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static NSArray<? extends NSFileVersion> unresolvedConflictVersionsOfItemAtURL(NSURL url)
public static long version_static()
public static NSFileVersion versionOfItemAtURLForPersistentIdentifier(NSURL url, java.lang.Object persistentIdentifier)
public NSURL URL()
public boolean hasLocalContents()
public boolean hasThumbnail()
public NSFileVersion init()
public boolean isConflict()
public boolean isResolved()
The operating system's reaction to your setting this to YES is complicated and subject to change in future releases. One result however is that the version won't appear in arrays returned by +unresolvedConflictVersionsOfItemAtURL: anymore, unless setting fails.
Once you have indicated that a conflict has been resolved you cannot make it unresolved again. Setting this to NO causes an exception to be thrown.
public void setResolved(boolean value)
The operating system's reaction to your setting this to YES is complicated and subject to change in future releases. One result however is that the version won't appear in arrays returned by +unresolvedConflictVersionsOfItemAtURL: anymore, unless setting fails.
Once you have indicated that a conflict has been resolved you cannot make it unresolved again. Setting this to NO causes an exception to be thrown.
public java.lang.String localizedName()
public java.lang.String localizedNameOfSavingComputer()
public NSDate modificationDate()
public NSCoding persistentIdentifier()
public boolean removeAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> outError)
You cannot use this method to delete the versioned file itself. This method always throws an exception when sent to the result of invoking +currentVersionOfItemAtURL:. Use -[NSFileManager removeItemAtURL:error:] for that instead.
When removing versions of a file you should do it as part of a coordinated write to the file. The advice about this for +addVersionOfItemAtURL:withContentsOfURL:options:error: applies here too.
public NSURL replaceItemAtURLOptionsError(NSURL url, long options, org.moe.natj.general.ptr.Ptr<NSError> error)
When you use NSFileVersionReplacingByMoving you remove a version of the file, and should do it as part of a coordinated write to the file. The advice about this for +addVersionOfItemAtURL:withContentsOfURL:options:error: applies here too. When you use it to promote a version to a separate file you actually write to two files, and should do it as part of a coordinated write to two files, using -[NSFileCoordinator coordinateWritingItemAtURL:options:writingItemAtURL:options:error:byAccessor:], most likely using NSFileCoordinatorWritingForReplacing for the file you're promoting the version to.
public NSPersonNameComponents originatorNameComponents()