swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Other Library Functions  
function  

vfs.change-owner

 
 

Library: File system utilities (OMVFS)
Import: omvfs.xmd

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

Notes

This function is not supported on Windows 98/ME.

Exceptions

The following exceptions may occur:

      Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.