Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

NSFileVersionMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class iCloud MBS MacCloud Plugin 11.2 Yes No No Yes, macOS only No
Function: The class for different file versions on Mac OS X 10.7.
Instances of NSFileVersionMBS for the same version of the same file are equal, and instances of NSFileVersionMBS for different versions of the same file are not equal, but the equality of NSFileVersionMBSs for different files is undefined. Repeated invocations of the methods that return NSFileVersionMBSs do not necessarily return the exact same instance of NSFileVersionMBS.

An NSFileVersion object represents a snapshot of a file at a specific point in time. You use the NSFileVersion class to access and create and manage file revisions in your application. Each instance of this class contains meta information about a single revision, such as the location of the file containing the revision data, the modification date of the revision, and whether the revision is discardable.

In Mac OS X applications, you can use file version objects to track changes to a local file over time and to prevent the loss of data during editing. When managing local versions, the document architecture creates versions at specific points in the lifetime of your application. Your application can also create versions explicitly at times that your application designates as appropriate.

In addition to managing local files, the system also uses this class to manage cloud-based files. For files in the cloud, there is usually only one version of the file at any given time. However, additional file versions may be created in cases where two different computers attempt to save the file to the cloud at the same time. In that case, one file is chosen as the current version and any other versions are tagged as being in conflict with the original. Conflict versions are reported to the appropriate file presenter objects and should be resolved as soon as possible so that the corresponding files can be removed from the cloud.

Available on Mac OS X 10.7 or later.
Please also check the documentation from Apple for the NSFileVersion class.

Works also well with files in backup (Time Machine) to find older versions.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Feedback, Comments & Corrections

This class has no sub classes.

Some events for this class:

The items on this page are in the following plugins: MBS MacCloud Plugin.

NSFilePresenterMBS   -   NSFileWrapperMBS

MBS Xojo Plugins