Features:
The top-level object of the NetWare File System Manager UCX component.
Contains properties and methods related to basic operations, such as copying, parsing, and finding an object.
Acts as the entry point to other NWFileMgr objects.
The ParsedName object is created based on the full name of the file or directory.
The TrusteePath object contains information about the path and the Trustee rights for this path.
Returns the entry object that represents the current working directory.
Object.CurrentDir
Entry.
Read-only.
This example returns an Entry object that represents the current working directory.
Set filemgr = Createobject("ucx:NWFileMgr")
Set currentDir=filemgr.Currentdir
Print(currentDir.Name)
Changes the current working directory.
Object.ChangeDir(
Path As String)
The absolute or relative path to the directory that is to be set as the current working directory.
Boolean. Returns TRUE if the current working directory is changed successfully.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example changes the current working directory to the NSN directory on volume Sys.
Set nwdir = Createobject("ucx:NWDir")
nwdir.FullName = "NDS:\\acme-tree\context"
’Authenticate to tree
nwdir.login ("username", "password")
Set filemgr = Createobject("ucx:NWFileMgr")
Set CurrentDir = filemgr.currentdir
Print (CurrentDir.Name)
If (filemgr.Changedir("sys:\nsn") Then
Print "Successfully changed the working directory"
Else
Print "Unable to change the working directory"
End If
Copies a file within the NetWare file system.
Object.Copy(
(SrcFile As String,
TgtFile As String)
The short name or absolute full name of the source file.
The short name or absolute full name of the target file.
Boolean. Returns TRUE if the file is copied successfully.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example copies the file test.nlm from the system directory on volume Sys to the temp directory on the same volume.
Set filemgr = Createobject("ucx:NWFileMgr")
If
fileMgr.Copy("Sys:system\text.nlm","sys:temp\test.nlm") Then
Print "Successfully copied the file"
Else
Print "Unable to copy the file"
End If
Finds a file or directory by path.
Object.FindEntry(
Path As String)
The path to the Entry object (file or directory) to search.
Entry. Returns the Entry object corresponding to the specified path.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example finds the file dir.bas in the NSN\util directory on volume Sys.
Set filemgr = Createobject("ucx:NWFileMgr")
Set entry = filemgr.FindEntry("Sys:NSN\util\dir.bas")
Print entry.Name
Returns the path for a Trustee object.
Object.GetTrusteePaths(
ObjectName As String,
[VolName As AnyType])
The name of the Trustee object.
Optional. The volume name or number. Can be either a String or an Integer.
TrusteePaths. Returns the path that corresponds to the Trustee object.
This example returns the trusteepaths for the Admin object on volume sys.
Set filemgr = Createobject("ucx:NWFileMgr")
Set Tpaths = filemgr.GetTrusteepaths("Admin","sys")
Tpaths.Reset()
While(Tpaths.Hasmoreelements())
Set Tpath = Tpaths.Next()
Print ("Path "&Tpath.path&" rights "&Tpath.rights)
Wend
Parses a file or directory.
Object.Parse(
Fullname As String)
The name of the file or directory to parse.
ParsedName. Parses the specified file or directory.
This example parses the file dir.bas.
Set filemgr = Createobject("ucx:NWFileMgr")
Set pObj = fileMgr.Parse("Sys:NSN\util\dir.bas")
Print(pObj.Name)