Skip to content

ZosUnixObject

The ZosUnixObject object represents a Unix file system object, which can be a Unix directory, a Unix file, or a Unix symbolic link. ZosUnixObject is the base class for the ZosUnixDirectory, ZosUnixFile, and ZosUnixLink classes. The FileType property indicates whether the ZosUnixObject is actually a ZosUnixDirectory, a ZosUnixFile, or a ZosUnixLink object.

This object can be obtained using any of the following:

  • GetUnixObject method of ZosServer

  • UnixRootDirectory property of ZosServer

  • TargetDirectory property of ZosUnixFolder

  • TargetObject of ZosUnixLink

  • GetObject method of ZosDirectory

  • GetObjects member of ZosDirectory

ZosUnixObject Properties

ZosUnixObject exposes the following properties:

Property Type R/W Description
Name String R Directory, file, or symbolic link name.
Path String R Full path name of the Unix file system object. For example:
\\server\Unix\u\judy
UnixPath String R Unix file system path name (for example /u/judy).
FileType ZosUnixFileType R Type of Unix file system object (directory, file, or symbolic link).
CreationTime DateTime R Creation time.
LastWriteTime DateTime R Last update time.
LastAccessTime DateTime R Last access time.
User String R User owner.
Group String R Group .
UserAccess ZosUnixAccess R/W User access permissions.
GroupAccess ZosUnixAccess R/W Group access permissions.
OtherAccess ZosUnixAccess R/W Other access permissions.

...

ZosUnixObject Methods

ZosUnixObject exposes the following methods:

CheckAccess Method

Checks whether or not the user has the specified access permissions for the Unix directory or file.

Boolean  CheckAccess(  
        ZosUnixAccessCheck flags  ) 

Delete Method

Deletes the file, directory, or link. For directories, contents are also deleted.

void  Delete()

Refresh Method

Refreshes the Unix file system information.

void  Refresh() 

Rename Method

Renames the file. You can optionally replace an existing file with the same name. This option is not valid for directories.

void Rename(  
        String newName,  
        Boolean replaceExisting [optional] ) 

...

Back to top