vfs.change-owner
          
          
Declaration export external function change-owner
 value string  path
 on value directory on-dir optional
 owner value string owner optional
 group value string group optional
 contents value switch contents optional initial {contents-not-included}
Argument definitions
- path
 - The file or directory for which to change the group and/or owner. May be specified as an absolute path or relative to the current working directory.
 
- dir
 -  A connected vfs.directory object. If a vfs.directory object is specified, the path parameter must be relative to the vfs.directory and must be specified as a URL.
 
- owner
 -  The name of the owner to be applied to the specified file or directory.
 
- group
 -  The name of the group to be applied to the specified file or directory.
 
- contents
 -  Specifies whether the ownership of the content of a directory is also to be changed. Values are vfs.contents-included or vfs.content-not-included. The default is vfs.contents-not-included.
 
Purpose
You can use vfs.change-owner to change a file's or directory's owner or group. The following program sets the owner and group of a file.
  import "omvfs.xmd" prefixed by vfs.
  
  process
     vfs.change-owner "afile.txt" owner "ftp" group "ftp"
 On Windows NT/2000/XP, 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". The following program sets the owner and group of a directory and all of its contents using Windows domain syntax:
  import "omvfs.xmd" prefixed by vfs.
  
  process
     vfs.change-owner "c:\some-dir" owner "Domain\ftp" group "Domain\ftp"
        contents vfs.contents-included
Exceptions
The following exceptions may occur:
- VFS001 The requested function is not supported for the type of connection
 - VFS100 The vfsDir object must be connected before it can be used
 - VFS004 The specified name 'X' exceeds system length limits
 - VFS105 The path 'X' is not a valid absolute or relative path
 - VFS111 The URL 'X' contains invalid encoding
 - VFS306 The file 'X' does not exist
 - VFS308 This function is not available on this operating system
 - VFS309 At least one of owner and group must be specified
 - VFS310 Insufficient permissions to complete operation