function
Library: File system utilities (OMVFS legacy)
Include: omvfs.xin |
define external function vfsChangeOwner value string path owner value string owner (optional) group value string group (optional) contents value switch contents (optional) or define external function vfsChangeOwner value string filename-URL on value vfsDir dir owner value string owner (optional) group value string group (optional) contents value switch contents (optional)
Argument definitions
Use vfsChangeOwner to change a file's or directory's owner or group.
You must include the following line at the beginning of your OmniMark program:
include "omvfs.xin"
path must:
filename-URL must:
The vfsDir object dir must:
One of owner or group must be specified (else external exception VFS309)
The OmniMark program attempting to change the owner or group must have sufficient permissions to complete the operation (else external exception VFS310)
The operating system on which the OmniMark program is running must support ownership and group privileges (else external exception VFS308)
On Windows, which has a notion of domains, the format for specifying owner and group is the domain followed by a backslash followed by the user or group, thus: "Domain\User".
If contents is set to VFS-INCLUDED and the target being modified is a directory then all the contents of the directory will also have the ownership change performed on them.
If the target being modified is a file then the value of contents is ignored.
External exception VFS111 is thrown if an URL supplied as a parameter to this function contains invalid encoding.
External exception VFS004 is thrown if the URL exceeds system length limits.
For complete details on absolute URLs and valid encoding, see Internet Standards RFC 1738: Uniform Resource Locators.
Setting an owner and group of a file
include "omvfs.xin" process vfsChangeOwner "afile.txt" owner "ftp" group "ftp"
Setting an owner and group directory and all of its contents using Windows domain syntax
include "omvfs.xin" process vfsChangeOwner "c:\some-dir" owner "Domain\ftp" group "Domain\ftp" contents VFS-INCLUDED