Indy 9 | Content | Index | Reference

TIdFTPListItem
Hierarchy, Properties, Methods, See Also, Unit: IdFTPList
Implements a directory entry for the TIdFTPList container.

    TIdFTPListItem = class(TCollectionItem)

Unit
IdFTPList
Description
TIdFTPListItem is a TCollectionItem descendant that implements methods and properties used to represent a directory entry in a TIdFTPListItems collection. TIdFTPListItem specifies a common representation for data returned by an FTP server for the LIST, NLST, or STAT commands.
Notes
The FTP protocol does not specify a standard representation for this type of data. TIdFTPListItem implements the common attributes found in most FTP server implementations.

TIdFTPListItem also provides the raw textual data used as the basis for the directory entry, and can be used with parsing methods in the TIdFTPListItems container to override the default parsing behavior.

TIdFTPListItem.Data
TIdFTPListItem, See Also
Represents the text used for a file or directory entry in the listing.

    property Data: string;

Description
Data is a String property that represents the raw textual data received for a file or directory entry from the LIST, NLST, or STAT command. Data is an individual line of text processed when TIdFTPListItems.LoadList is used to load directory entries in the container.

Data is used as the ItemName for the collection item when the ListFormat for the container is flfNoDetails. Data can be used in the TIdFTPListItems.OnParseCustomListFormat event handler to override the default parsing behavior when the ListFormat is flfCustom.

TIdFTPListItem.FileName
TIdFTPListItem, See Also
Name assigned to the entry in the directory listing.

    property FileName: string;

Description
FileName is a String property that represents the name assigned to the file or directory entry in the directory listing. Use LinkedItemName to access the file name for the endpoint of a symbolic link entry.

TIdFTPListItem.GroupName
TIdFTPListItem, See Also
Represents the group name that owns a file or directory entry.

    property GroupName: string;

Description
GroupName is a String property that represents the name of the group that owns the file or directory entry. GroupName has significance when the FTP server is hosted on the UNIX or Linux platforms, and may contain question marks when the attribute does not apply to the ListFormat for the directory listing.

TIdFTPListItem.GroupPermissions
TIdFTPListItem
Represents group owner permissions for the file or directory entry.

    property GroupPermissions: string;

Description
GroupPermissions is a String property that represents the permissions assigned to the group owner identified in GroupName. GroupPermissions has significance when the FTP server is hosted on the UNIX or Linux platforms, and may contain question marks when the attribute does not apply to the ListFormat for the directory listing.

GroupPermissions normally contains values that indicate the attributes or permissions assigned to the file or directory, and can contain the following values and meanings:

- — - Permission omitted.

- L - Symbolic Link.

- D - Directory entry.

- R - Read permission granted.

- W - Write prmission granted

- X - Execute permission granted.

TIdFTPListItem.ItemCount
TIdFTPListItem
Number of items located in a directory entry.

    property ItemCount: Integer;

Description
ItemCount is an Integer property that represents the number of items that can be found in an entry that represents a directory on the FTP server. ItemCount will contains zero (0) when the entry is a file. ItemCount us updated when Parse is used to load values for the directory list.

TIdFTPListItem.ItemType
TIdFTPListItem
Represents a set of file system attributes for the collection item.

    property ItemType: TIdDirItemType;

Description
ItemType is a TIdDirItemTypeSet property that represents a set of attributes for the collection item that describe it usage in the directory listing.

ItemType can include one or more of the following values:

- ditDirectory - Entry is a file.

- ditFile - Entry is a directory.

- ditSymbolicLink - Entry is a symbolic link.

The default value for ItemType is the empty set ([]) as assigned in the Create constructor.

ItemType is updated when the Parse method for the collection is used to extract property values from the text for the directory listing.

TIdFTPListItem.LinkedItemName
TIdFTPListItem, See Also
File name that is the endpoint for a Symbolic Link directory entry.

    property LinkedItemName: string;

Description
LinkedItemName is a String property that represents the file name that is the endpoint for a Symbol Link in a directory listing. LinkedItemName is updated when TIdFTPListItems calls Parse, when IsSymbolicLink returns True for the directory entry.

TIdFTPListItem.ModifiedDate
TIdFTPListItem
Represents the creation or modification date for a directory listing item.

    property ModifiedDate: TDateTime;

Description
ModifiedDate is a TDateTime property that represents the date and time that file or directory entry in the directory listing was created or modified.

ModifiedDate is determined when TIdFTPListItems.Parse is used to extract property values for the directory listing item. ModifiedDate provides a complete date and time value, and may use defaults values not specified in a partial or incomplete result for a given TIdFTPListFormat.

When default values are used in ModifiedDate components, they are generally identified by the following values:

- Year - Year value for the current date.

- Hour - 00

- Minutes - 00

- Seconds - 00

- Milliseconds - .999

TIdFTPListItem.OwnerName
TIdFTPListItem, See Also
Represents the name of the user that owns a file or directory entry.

    property OwnerName: string;

Description
OwnerName is a String property that represents the name of the user that owns the file or directory entry. OwnerName has significance when the FTP server is hosted on the UNIX or Linux platforms, and may contain question marks when the attribute does not apply to the ListFormat for the directory listing.

TIdFTPListItem.OwnerPermissions
TIdFTPListItem
Represents permissions for the user that owns the file or directory entry.

    property OwnerPermissions: string;

Description
OwnerPermissions is a String property that represents the permissions assigned to the user owner identified in OwnerName. OwnerPermissions has significance when the FTP server is hosted on the UNIX or Linux platforms, and may contain question marks when the attribute does not apply to the ListFormat for the directory listing.

OwnerPermissions normally contains values that indicate the attributes or permissions assigned to the file or directory, and can contain the following values and meanings:

- — - Permission omitted.

- L - Symbolic Link.

- D - Directory entry.

- R - Read permission granted.

- W - Write prmission granted

- X - Execute permission granted.

TIdFTPListItem.Size
TIdFTPListItem, See Also
Indicates the size of a file on the FTP server.

    property Size: Int64;

Description
Size is a Int64 property that represents the size in bytes of the file or directory entry in FileName on the FTP server. Size will contain the value zero (0) when the entry is for a directory, and the value in ItemCount will indicate the number of files or sub directories in the directory entry.

TIdFTPListItem.UserPermissions
TIdFTPListItem
Represents effective permissions for the user based on user and group permissions.

    property UserPermissions: string;

Description
UserPermissions is a String property that represents the effective user permissions assigned to the user identified in UserName for the FTP connection. UserPermissions will reflect the permission based on the user account and permissions assigned to the group for the user. UserPermissions has significance when the FTP server is hosted on the UNIX or Linux platforms, and may contain question marks when the attribute does not apply to the ListFormat for the directory listing.

UserPermissions normally contains values that indicate the attributes or permissions assigned to the file or directory, and can contain the following values and meanings:

- — - Permission omitted.

- L - Symbolic Link.

- D - Directory entry.

- R - Read permission granted.

- W - Write prmission granted

- X - Execute permission granted.

TIdFTPListItem.Assign
TIdFTPListItem
Copies property values from another persistent object instance.

    procedure Assign(Source: TPersistent); override;

Parameters
Source: TPersistent
Object instance with property values to be copied.
Description
Assign is a procedure that copies property values for another persistent object instance to the current object instance. Assign copies the value of propertied including:

- Data

- OwnerPermissions

- GroupPermissions

- UserPermissions

- ItemCount

- OwnerName

- GroupName

- Size

- Modified

- ItemName

- LinkedItemName

- IsDirectory

- IsSymbolicLink

TIdFTPListItem.Create
TIdFTPListItem, See Also
Constructor for the collection item.

    constructor Create(AOwner: TCollection); override;

Parameters
AOwner: TCollection
Collection that owns the collection item.
Description
Create is the constructor for the collection item, and calls the inherited Create method using the owner collection specified in AOwner. Create sets the default values for properties in the TIdFTPListItem instance. Some properties may not be used for some directory list formats, and will be filled with one or more question marks ('?') when the file or directory attribute is not applicable to the list format.

TIdFTPListItem.Text
TIdFTPListItem
Determines the textual representation of the directory listing item.

    function Text: string;

Return Value
String - Text representation of the directory listing item.
Description
Text is a String function that returns a standardized textual representation of values in a directory listing item. Text uses the value in TIdFTPListItems.ListFormat to determine the contents of the return value, and returns the following data items for the given value:

- flfNone - Contents of the Data property.

- flfNoDetails - Contents of the FileName property.

- flfUnknown - No value is returned.

- flfCustom - Value returned from the TIdFTPListItems.OnGetCustomListFormat event handlers.

- flfDos - Contents formatted like and MS DOS Directory listing.

- flfUnix, flfVax - Contents formatted in a UNIX-style directory listing.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.