|
The OnFileList event is generated when a remote file list
is parsed by the control.
This event has been deprecated and
should no longer be used in new applications.
Syntax
Sub object_OnFileList( [Index As
Integer], ByVal FileName As Variant,
ByVal FileLength As Variant, ByVal
FileDate As Variant, ByVal FileOwner
As Variant, ByVal FileGroup As Variant,
ByVal FilePerms As Variant, ByVal
IsDirectory As Variant )
Remarks
The OnFileList event is generated as the control parses the
list of files returned by the server as the result of the application
calling the FileList method. The following arguments are
passed to the event handler:
- FileName
- A string which specifies the name of the file that status
information is being returned for.
- FileLength
- A numeric value which specifies the size of the file on the
server. Note that if this is a text file, the file size may be
different on the server than it is on the local system. This
is because different operating systems use different conventions
that indicate the end of a line and/or the end of the file. On
MS-DOS and Windows platforms, directories have a file size of zero
bytes.
- FileDate
- A string argument which specifies the date and time the file
was created or last modified on the server. The date format
that is returned is expressed in local time (in other words, the
timezone of the server is not taken into account) and
depends on both the local host settings via the Control Panel and
the format of the date and time information returned by the server.
- FileOwner
- A string argument which specifies the owner of the file on the
server. On some platforms, this information may not be
available for security reasons if an anonymous login session was
specified.
- FileGroup
- A string argument which specifies the group that the file owner
belongs to. On some platforms, this information may not be
available for security reasons if an anonymous login session was
specified.
- FilePerms
- A numeric value which specifies the permissions assigned to
the file. This value is actually a combination of one or more bit
flags that specify the individual permissions for the file owner,
group and world (all other users). The permissions are as
follows:
Value |
Constant |
Description |
4096 |
ftpPermSymbolicLink |
The file is a symbolic link to another file. Symbolic links
are special types of files found on UNIX based systems which
are similar to Windows shortcuts. |
1024 |
ftpPermOwnerRead |
The owner has permission to open the file for reading. If
the current user is the owner of the file, this grants the user
the right to download the file to the local system. |
512 |
ftpPermOwnerWrite |
The owner has permission to open the file for writing. If
the current user is the owner of the file, this grants the user
the right to replace the file. If this permission is set for a
directory, this grants the user the right to create and delete
files. |
256 |
ftpPermOwnerExecute |
The owner has permission to execute the contents of the
file. The file is typically either a binary executable, script
or batch file. If this permission is set for a directory, this
may also grant the user the right to open that directory and
search for files in that directory. |
64 |
ftpPermGroupRead |
Users in the specified group have permission to open the
file for reading. If the current user is in the same group as
the file owner, this grants the user the right to download the
file. |
32 |
ftpPermGroupWrite |
Users in the specified group have permission to open the
file for writing. On some platforms, this may also imply
permission to delete the file. If the current user is in the
same group as the file owner, this grants the user the right to
replace the file. If this permission is set for a directory,
this grants the user the right to create and delete files. |
16 |
ftpPermGroupExecute |
Users in the specified group have permission to execute the
contents of the file. If this permission is set for a
directory, this may also grant the user the right to open that
directory and search for files in that directory. |
4 |
ftpPermWorldRead |
All users have permission to open the file for reading.
This permission grants any user the right to download the file
to the local system. |
2 |
ftpPermWorldWrite |
All users have permission to open the file for writing.
This permission grants any user the right to replace the file.
If this permission is set for a directory, this grants any user
the right to create and delete files. |
1 |
ftpPermWorldExecute |
All users have permission to execute the contents of the
file. If this permission is set for a directory, this may also
grant all users the right to open that directory and search for
files in that directory. |
For the proprietary Sterling directory formats, the status code
is returned in the FilePerms argument. This value is a
combination of bits. Bits 0-25 correspond to letters of the
alphabet, most of which have distinct meanings in the Sterling
formats.
Letter code |
Bit position |
Hexadecimal value |
A |
0 |
1h |
B |
1 |
2h |
C |
2 |
4h |
n-th letter of alphabet |
n-1 |
2 to the (n-1) power |
Z |
25 |
2000000h |
For the proprietary Sterling directory formats, bits 26-31
represent the transfer protocol associated with the file:
Protocol |
Bit position |
Hexadecimal value |
Constant |
TCP |
26 |
4000000h |
ftpSterlingStatusTcp |
FTP |
27 |
8000000h |
ftpSterlingStatusFtp |
BSC |
28 |
10000000h |
ftpSterlingStatusBsc |
ASC |
29 |
20000000h |
ftpSterlingStatusAsc |
FTS |
30 |
40000000h |
ftpSterlingStatusFts |
other |
31 |
80000000h |
ftpSterlingStatusOther |
- IsDirectory
- A boolean argument which specifies if the file is a directory
or a regular file.
See Also
ParseList Property,
FileList Method,
GetFileStatus Method,
OnLastFile Event
|
|