Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In addition to the specification in [MS-CIFS] section 2.2.1.1.2, pathnames include the following extension:
Previous Version Tokens -- Support for this feature is optional.<6>
Pathnames are allowed to contain a previous version token (or @GMT token), as a directory element in a path. A previous version token indicates that the pathname is a request to access the previous version (or shadow copy) of the file or directory at a particular point in time. This feature is available on any path-based operation (for example, SMB_COM_NT_CREATE_ANDX). A pathname MUST NOT contain more than one previous version token.
For example, requesting a previous version of the file \\server\mydocs\reviews\feb01.doc at 2:44:00 P.M. on March30, 2001 UTC is specified in the following format:
-
\\server\mydocs\reviews\@GMT-2001.03.30-14.44.00\feb01.doc
The same technique can be used to build a path that represents a previous version of a directory as opposed to a file.
For example, requesting a previous version of the directory \\server\mydocs\reviews at 2:44:00 PM on 3/30/01 UTC can be specified in either of the following formats:
A token appearing as an intermediate path component:
-
\\server\mydocs\@GMT-2001.03.30-14.44.00\reviews
A token appearing as a final path component:
-
\\server\mydocs\reviews\@GMT-2001.03.30-14.44.00
In addition, it is possible to request an enumeration of available previous version timestamps (or snapshots) of a file or directory. While the NT_TRANSACT_IOCTL subcommand can be used with the FSCTL_SRV_ENUMERATE_SNAPSHOTS FSCTL code to enumerate available previous version timestamps using a valid Fid (section 2.2.7.2.1), these extensions also present a path-based method to access this functionality. The TRANS2_FIND_FIRST2 subcommand's SMB_FIND_FILE_BOTH_DIRECTORY_INFO Information Level (section 2.2.6.1) has been extended to allow a special previous version wildcard token, @GMT-*.
For example, requesting an enumeration of available previous version timestamps of the examples, discussed earlier in this section, can be specified in the following ways:
-
\\server\mydocs\reviews\@GMT-*\feb01.doc \\server\mydocs\@GMT-*\reviews \\server\mydocs\reviews\@GMT-*