GetAttributes(Stream,String) Method

See Also

FtpDLX Class  | FtpDLX Members  | Overload List

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

JScript

Show All

FromStream
Remote stream that will be read by wodFtpDLX.NET.
RemoteFile
Full path to filename where Remote file will be copied on server.
See Also Requirements Languages WeOnlyDo.Client.FTP Send comments on this topic.

GetAttributes(String) Method

Retrieves file or folder attributes.

[Visual Basic]
Overloads Public Sub GetAttributes( _    ByVal RemoteFile As String _ )
[C#]
public void GetAttributes(    string RemoteFile );
[JScript]
public function GetAttributes(    RemoteFile : String );

Parameters

RemoteFile
Full path to a file/directory on remote system.

Remarks

The GetAttributes method will retrieve information about a file or directory on the remote server. Once these attributes are returned by the server, the Attributes event is fired containing parsed information.

This method will provide you with information about (in SFTP protocol only!):

Size as UInt64
Uid as Int64
Gid as Int64
Permissions as Int64
AccessTime as DateTime
ModificationTime as DateTime

The value for Permissions is defined by the POSIX standard, which is briefly described below:

- you should represent them in octal (base 8) to make parsing them easier
Permissions AND 777 (octal) will give you read/write/execute permissions for owner, group and others. To be more precise, 1 indicates execute permission, 2 indicates write permission, 4 indicates read permission. For example, if file Permission AND 777 (octal) gives 754, this is represented on the server as -rwxr-xr-- which means: the owner can read/write/execute, the group can read/execute, and others can only read.

To determine if an attribute belongs to directory, test for Permissions AND 40000 (octal). To determine if an attribute belongs to a symbolic link, test for Permissions AND 120000 (octal).

WARNING: in protocols other than SFTP this method will return only limited subset of available attributes. Since there is no common way to retrieve all of them, only Size and ModificationTime are provided. Other values will hold -1 value. We are open for any ideas to extend these protocols so they support full subset - as in SFTP protocol.
 

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

FtpDLX Class  | FtpDLX Members  | Overload List

 

 


© WeOnlyDo Software. All Rights Reserved.