ZosUnixLink
The ZosUnixLink object represents a Unix symbolic link. The ZosUnixLink class is derived from ZosUnixObject. The symbolic link can be to either a directory or file.
ZosUnixLink Properties
ZosUnixLink exposes the following properties, most of which are inherited from ZosUnixObject.
Property | Type | R/W | Description |
---|---|---|---|
Name | String | R | Symbolic link name. (Inherited from ZosUnixObject). |
Path | String | R | Full path name of the symbolic link. For example: |
\\server\Unix\u\judy\symlink. (Inherited from ZosUnixObject). | |||
UnixPath | String | R | Unix file system path name (for example /u/judy/symlink). (Inherited from ZosUnixObject). |
FileType | ZosUnixFileType | R | Type of Unix file system object, which is always SymLink for this type of object. (Inherited from ZosUnixObject). |
TargetPath | String | R | Path name for target of link. |
TargetObject | ZosUnixObject | R | The ZosUnixDirectory or ZosUnixFile object that represents the target of the link. |
CreationTime | DateTime | R | Creation time. (Inherited from ZosUnixObject). |
LastWriteTime | DateTime | R | Last update time. (Inherited from ZosUnixObject). |
LastAccessTime | DateTime | R | Last access time. (Inherited from ZosUnixObject). |
User | String | R | User owner. (Inherited from ZosUnixObject). |
Group | String | R | Group owner. (Inherited from ZosUnixObject). |
UserAccess | ZosUnixAccess | R/W | User access permissions. ((Inherited from ZosUnixObject). |
GroupAccess | ZosUnixAccess | R/W | Group access permissions. (Inherited from ZosUnixObject). |
OtherAccess | ZosUnixAccess | R/W | Other access permissions. (Inherited from ZosUnixObject). |
...
ZosUnixLink Methods
ZosUnixLink exposes the following methods, most of which are inherited from ZosUnixObject.
Create Method
Creates a new symbolic link.
static ZosUnixLink Create(
ZosUnixDirectory parent,
String name,
String targetPath
)
CheckAccess Method
Checks whether or not the user has the specified access permissions for the Unix file. (Inherited from ZosUnixObject).
Boolean CheckAccess(
ZosUnixAccessCheck flags
)
Delete Method
Deletes the symbolic link. (Inherited from ZosUnixObject).
void Delete()
Refresh Method
Refreshes the Unix file system information. (Inherited from ZosUnixObject).
void Refresh()
Rename Method
Renames the file. You can optionally replace an existing file with the same name. (Inherited from ZosUnixObject).
void Rename(
String newName,
Boolean replaceExisting
)
...
ZosUnixLink Examples
Examples of using ZosUnixLink are shown below.
C
ZosUnixLink link;
ZosUnixDir parent;
ZosUnixObject target = link.TargetObject;
link = ZosUnixLink.Create(parent, “MyStuff”, “/u/Judy/Stuff”);
...
C++
ZosUnixLink^ link;
ZosUnixDir^ parent;
ZosUnixObject target = link.TargetObject;
link = ZosUnixLink::Create(parent, “MyStuff”, “/u/Judy/Stuff”);
...
Visual Basic
Dim link As ZosUnixLink
Dim parent As ZosUnixDir
Dim target As ZosUnixObject = link.TargetObject;
link = ZosUnixLink.Create(parent, “MyStuff”, “/u/Judy/Stuff”)
...
Jscript
var link : ZosUnixLink;
var parent : ZosUnixDir;
var target : ZosUnixObject = link.TargetObject;
link = ZosUnixLink.Create(parent, “MyStuff”, “/u/Judy/Stuff”);
...