Represents a file or directory on a NetWare file system.
Returns the date on which the file or directory was last accessed, or sets the access date for the object.
Object.AccessDate[=DateValue As Date]
Date.
Read/write.
DateValue is an optional parameter that sets the access date to the specified value.
See sample in Example.
Returns the date the file or directory was archived, or sets the object's archive date.
Object.ArchiveDate[=DateValue As Date]
Date.
Read/write.
DateValue is an optional parameter that sets the archive date to the specified value.
See sample in Example.
Returns the attributes of a file or directory. Return value is one of the attribute constants.
Object.Attributes
Integer.
Read/write.
See sample in Example.
Returns the creation date of the file or directory, or sets the object's creation date.
Object.CreateDate[=DateValue As Date]
Date.
Read/write.
DateValue is an optional parameter that sets the creation date to the specified value.
See sample in Example.
Determines whether the Entry object is a directory.
Object.Directory
Boolean. Returns TRUE if a specific object is a directory.
Read-only.
This example returns the message "dir.bas is a file" as the specified object dir.bas is a file.
Set filemgr = Createobject("ucx:NWFileMgr")
Set entry = filemgr.FindEntry("Sys:NSN\util\dir.bas")
If(entry.Directory) Then
Print(entry.Name & "is a directory")
Else
Print(Entry.name & "is a file")
End If
Returns the date on which the object was last modified, or sets the object's modification date.
Object.ModifyDate[=DateValue As Date]
Date.
Read/write.
DateValue is an optional parameter that sets the modification date to the specified value.
See sample in Example.
Sets or returns the name of a object.
Object.Name[=Value As String]
String.
Read/write.
Value is an optional parameter that changes the name of the object.
Returns the owner of a file or directory.
Object.Owner
String.
Read-only.
Returns the size of a file.
Object.Size
Long.
Read-only.
If the object is a directory, this property returns 0 (zero).
Returns the directory space restriction value in Kilo Bytes (KB).
Object.SpaceLimit[=Value As Long]
Long.
Read-write.
If there is no space restriction, this property returns zero.
To get or set this property in Web scripts, user should have rights equivalent to the administrator. Else, error will be thrown.
When this property is set, the space limit would be truncated to nearest 4 KB. For example if seventy seven (77) is assigned, the space limit will be set to seventy six (76) only.
If error is thrown, this property is set to -1.
This sample sets the space limit for sys:\nsn\util directory.
On Error Resume Next
Set filemgr = CreateObject("ucx:NWFileMgr")
’ Set the space restriction for util directory to 80KB
’
Set entry = filemgr.FindEntry("sys:\nsn\util")
entry.spacelimit=80
Print "The space Limit for sys:\nsn\util directory is " &entry.spacelimit &"
KB"
Returns the Trustees of a file or directory.
Object.Trustees
Trustees.
Read-only.
This example returns the trustees, size, attributes, owner, name, last modified date, creation date, last archived date and last access date of the file dir.bas.
Set filemgr = Createobject("ucx:NWFileMgr")
Set entry = filemgr.FindEntry("Sys:NSN\util\dir.bas")
Print(entry.Trustees)
Print(entry.Size)
Print(entry.Owner)
Print(entry.Name)
Print(entry.Attributes)
Print(entry.ModifyDate)
Print(entry.CreateDate)
Print(entry.ArchiveDate)
Print(entry.AccessDate)
Returns child entries of a directory.
Object.GetChildren(
[NameFilter As String],
[TypeFilter As Integer])
Optional. Use this parameter to retrieve specific types of files or directories. Wildcards such as * and ? can be used. By default the NameFilter is set to *.
Optional. Filters the entries in the directory. This parameter can have any of the Section A.9, Directory Entry Filter Constants. By default the TypeFilter is set to DIR_OPT_ALL.
Entries. If the current object is a directory, this method returns its child entries. If it is a file, it returns NULL value.
If the current object is a directory, this example returns its child Entries. If it is a file, this example returns NULL. The optional parameters of this method help in filtering the resulting entries.
Set filemgr = Createobject("ucx:NWFileMgr")
Set entry = filemgr.FindEntry("Sys:NSN\util")
Set entries = entry.GetChildren("*.*",DIR_OPT_FILES)
entries.Reset()
While(entries.HasMoreElements())
Set fileentry=entries.Next()
Print(fileEntry.name)
Wend