Represents the collection of Entry objects (files and directories) on a NetWare file system.
Creates a directory.
Object.AddElement(
DirName As String)
The name of the directory to be created. The path can be either the path relative to the current working directory, or the full path.
Entry.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example creates the directory Philbin.
Set filemgr = Createobject("ucx:NWFileMgr")
Set currentDir=filemgr.CurrentDir
Set entries = currentDir.GetChildren()
entries.AddElement("Philbin")
Finds a file or directory by name.
Object.Element(
EntryName As String)
The name of the file or directory to be found.
Entry. Returns the specified Entry object. If the object is not available this method returns NULL value.
EntryName can be either the name of a file or the name of a directory.
This example finds the file jetson.bas.
Set filemgr = Createobject("ucx:NWFileMgr")
Set currentDir=filemgr.CurrentDir
Set entries = currentDir.GetChildren()
Set entry = entries.Element("jetson.bas")
Print entry.Name
Determines whether the collection contains any more Entry objects.
Object.HasMoreElements()
None.
Boolean. Returns TRUE if the collection contains more Entry objects.
See sample in Example.
Returns the next Entry object in the Entries collection.
Object.Next()
None.
Entry object. Returns the next Entry object in the collection. If there are no objects in the collection this method returns NULL.
See sample in Example.
Deletes the specified Entry object from the collection.
Object.RemoveElement(
EntryName As String)
The name of the file or directory to be deleted.
Boolean. Returns TRUE if the Entry object is successfully removed.
The entryName parameter can be either the name of a file or the name of a directory.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example removes the file Philbin from the collection.
set filemgr = Createobject("ucx:NWFileMgr")
set currentDir=filemgr.CurrentDir
set entries = currentDir.getChildren()
If entries.RemoveElement("Philbin") Then
Print("Object deleted successfully")
Else
Print("Unable to delete the object")
End If
Resets the collection of Entry objects.
Object.Reset()
None.
Void.
This method is the first operation that starts the iteration over files and directories.
This example resets the collection of Entry objects.
Set filemgr = Createobject("ucx:NWFileMgr")
Set currentDir=filemgr.CurrentDir
Set entries = currentDir.GetChildren()
entries.Reset()
While(entries.HasMoreElements)
Set entry = entries.Next()
Print(entry.Name)
Wend