If you feel some confusion about any thing or if you do not find what you are looking for, please inform us so that we can improve our documentation accordingly. docs@aspfusion.net

AdvDirectory 

The component provides you complete directory management on server. While turning on the component for a new website, the system takes physical path, which is usually the web root of that website. All directory management operations are restricted to the physical path mentioned in ASPFusion administration. It provides following operations for server side directory management.

  1. Complete basic directory management operations, such as Create, Delete and Rename a directory.

  2. Along with these basic operations, it provides List for getting listing of all files and directories under the given directory, and returns their Attributes, Size, Creation Date, Last Modified Date and Type, and also can sort the listing in ascending and descending given sorting criteria.

<%set Obj = Server.CreateObject("AdvDirectory.Directory")%> 

AdvDirectory Properties 

Property

Description

Dot

Set whether to show "." or ".." directories in case of list method. Valid values are
FALSE (default) do not return "
." and ".."directories
TRUE return
"." and ".."directories
Example:

<%Obj.Dot = true%>

ErrorReason

Reports any errors that occur during the request
Example:
<%if Obj.IsError = 1 then
       
Response.Write Obj.ErrorReason
else
       
No Error
end if %>

Filter

File extension filter to be applied to returned names, for example: *.asp. Only one mask filter can be applied at a time. If not specified then default value is *.*
Example:
<%Obj.Filter = "*.asp"%>

IsError

Returns 1 if any error occur during the request otherwise 0
Example:
<%if Obj.IsError = 1 then
       
Error
else
       
No Error
end if %>

Sort

List of query columns to sort directory listing. Valid values are Name_ASC (default)
Name_DESC
Size_ASC
Size_DESC
Type_ASC
Type_DESC
Attributes_ASC
Attributes_DESC
DateLastModified_ASC
DateLastModified_DESC
DateCreated_ASC
DateCreated_DESC
Example:
<%Obj.Sort = “Type_ASC”%>

AdvDirectory Methods 

Method

Parameter

Return Value

Description

Create

strDirectory

None

Create a directory
Example:
<%Obj.Create(
strDirectory)%>

Delete

strDirectory

None

Delete a directory
Example:
<%Obj.Delete(
strDirectory)%>

List

strDirectory  

Array of objects

Return listing of a directory
Example:
<%set Result = Obj.List(strDirectory)
for each Member in Result
     
=Member.Name
     
=Member.Type
     
=Member.Size
     
=Member.Attributes
     
=Member.DateLastModified
     
=Member.DateCreated
next
set
Result = nothing%>

Rename

oldDirectory
newDirectory

None

Rename a directory
Example:
<%Obj.Create(old
Directory, newDirectory)%> 

Back

Copyright © 2000, Advanced Communications