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

vfs.change-owner

 
 

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

Declaration

  export external function change-owner
   value stream  path
   on value directory on-dir optional
   owner value stream owner optional
   group value stream 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
   vfs.change-directory
   vfs.change-owner
   vfs.change-permissions
   vfs.close
   vfs.connect
   vfs.connect-directory
   vfs.copy
   vfs.cursor-position
   vfs.default-certificates-file
   vfs.delete-directory
   vfs.delete-file
   vfs.describe
   vfs.describe-file
   vfs.directory
   vfs.directory-name
   vfs.disconnect
   vfs.file
   vfs.file-directory
   vfs.file-name
   vfs.link
   vfs.list
   vfs.lock
   vfs.make-directory
   vfs.move
   vfs.move-cursor
   vfs.omvfs-version
   vfs.open
   vfs.open-file-system
   vfs.open-ftp
   vfs.open-http
   vfs.open-https
   vfs.reader
   vfs.set-default-certificates-file
   vfs.truncate
   vfs.unlock
   vfs.writer
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:46:00 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.