DirItem Object

Overview

A DirItem object resides in an UploadManager.Directory collection and represents a file or subfolder in this directory.

Member List

Properties


Attributes As Long (Read-only)

Returns this file's system attributes. Can be a combination of file attribute values defined in the AspUpload type library:

FILE_ATTR_READONLY = &H1
FILE_ATTR_HIDDEN = &H2
FILE_ATTR_SYSTEM = &H4
FILE_ATTR_DIRECTORY = &H10
FILE_ATTR_ARCHIVE = &H20
FILE_ATTR_NORMAL = &H80
FILE_ATTR_TEMPORARY = &H100
FILE_ATTR_COMPRESSED = &H800

Usage:
<!--METADATA TYPE="TypeLib" UUID="{B4E1B2DE-151B-11D2-926A-006008123235}"-->
Response.Write Item.Attributes

Relevant Chapters: 9


CreationTime As Date (Read-only)

Returns the file's Creation timestamp.

Usage:
Response.Write Item.CreationTime

Relevant Chapters: 9


FileName As String (Read-only)

Returns the name of the file or subdirectory.

Usage:
Response.Write Item.FileName

Relevant Chapters: 9


FileType As String (Read-only)

Returns file type according to file extension and registry settings. For subfolders, this value will be set to "File Folder". For files without an extension, this property will be set to "File". For files with extensions that do not have corresponding registry settings (e.g. .xyz) this property will be set to "XYZ File".

Usage:
Response.Write Item.FileType

Relevant Chapters: 9


IsSubdirectory As Boolean (Read-only)

Returns True is the item represents a subdirectory or False if it represents a file.

Usage:
If Item.IsSubdirectory Then ...

Relevant Chapters: 9


LastAccessTime As Date (Read-only)

Returns the file's Last Access timestamp.

Usage:
Response.Write Item.LastAccessTime

Relevant Chapters: 9


LastWriteTime As Date (Read-only)

Returns the file's Last Write timestamp.

Usage:
Response.Write File.LastWriteTime

Relevant Chapters: 9


Size As Long (Read-only)

Returns file size in bytes. If the item is a subdirectory the size is 0.

Usage:
Response.Write Item.Size

Relevant Chapters: 9

Methods


Function CheckAttribute(Attributes As Long) As Boolean

Check if the specified file attribute is present among this file's attributes. Returns True if Attribute is set, False otherwise. Attribute must be set to one, or a combination of, File Attribute constants defined in the AspUpload type library, such as FILE_ATTR_READONLY.

Usage:

<!--METADATA TYPE="TypeLib" UUID="{B4E1B2DE-151B-11D2-926A-006008123235}"-->
If Item.CheckAttribute(FILE_ATTR_READONLY)Then
  Response.Write "R"
End If

Relevant Chapters: 9