:GetFirstFile()
Class
Syntax
:GetFirstFile( [hSession] ) -> aFile
Parameters
|
|
hSession |
Optional: If hSession is not passed, the value in :Session will be used |
Return
An array that contains the File information for current file.
Description
The :GetFirstFile() method returns the first file in the directory listing returned by the server after a call to the :OpenDirectory() method.
This file list information returned by the server is cached by the library, allowing you to use this method to reposition back to the beginning of the file list.
The array elements are defined as:
|
|
Constant |
|
Array Element Description |
|
|
FTP_FILE_NAME |
1 |
String. A string which contains the name of the file on the remote host. |
|
|
FTP_FILE_OWNER |
2 |
String. A string which contains the name of the user that owns the file on the remote host. Note that not all server types support the concept of file ownership by a user. Some UNIX systems will not provide this information if an anonymous login was used. For the proprietary Sterling directory formats, the "mailbox" is stored in this member. |
|
|
FTP_FILE_GROUP |
3 |
String. A string which contains the name of the group that owns the file on the remote host. Note that not all server types support the concept of file ownership by a group. For the proprietary Sterling directory formats, the "batch number" is stored in this member, with the character # preprended for the format FTP_DIRECTORY_STERLING_2. |
|
|
FTP_FILE_ISDIRECTORY |
4 |
Logical. True if the file is actually a subdirectory, otherwise False |
|
|
FTP_FILE_SIZE |
5 |
Numeric. The size of the file in bytes on the remote server. Servers that return file information in an MS-DOS format will always set this value to zero if the file refers to a subdirectory. If the file is a text file, the file size on the server may be different than the size on the local host if different end-of-line character conventions are used. It should be noted that under VMS, the file size is reported in 512 byte blocks, so the size should be considered approximate on that platform. |
|
|
FTP_FILE_LINKS |
6 |
Numeric The number of links to the file. Note that not all server types support the concept of file links, in which case this value will be zero. |
|
|
FTP_FILE_VERSION |
7 |
Numeric. The number of revisions made to the file. Note that not all server types support the concept of file versioning, in which case this value will be zero. Currently this value will only be non-zero for VMS platforms. |
|
|
FTP_FILE_PERMISSIONS |
8 |
String. The permissions associated with the file. This value is specifies the individual permissions for the file owner, group and world (all other users). For those familiar with UNIX, the file permissions are the same as those used by the chmod command. |
|
|
FTP_FILE_DATE |
9 |
Date. File date. |
|
|
FTP_FILE_DOW |
10 |
String. Day of the week associated with the File date. |
|
|
FTP_FILE_TIME |
11 |
String. Time of the File in the format HH:MM:SS.mm |
See Also
:ChangeDirectory(), :CloseDirectory(), :GetDirectoryFormat(), :GetFileStatus(), :GetNextFile(), :OpenDirectory(), :SetDirectoryFormat()