Back to product page

RealPath method


Retrieves real path for the symbolic link.

Type

Void

Syntax

  • C#
  • VB.NET
public Void RealPath();

public Void RealPath(Stream OutStream);
The RealPath(OutStream) syntax has these parts:
OutStreamOutput Stream where wodSFTP.NET will write resolved path of the link.

public Void RealPath(String RemotePath);
The RealPath(RemotePath) syntax has these parts:
RemotePathFull path to the symbolic link that should be resolved.

public Void RealPath(String RemotePath, Stream OutStream);
The RealPath(RemotePath,OutStream) syntax has these parts:
RemotePathFull path to the symbolic link that should be resolved.
OutStreamOutput Stream where wodSFTP.NET will write resolved path of the link.

public Sub RealPath()

public Sub RealPath(ByVal OutStream As Stream)
The RealPath(OutStream) syntax has these parts:
OutStreamOutput Stream where wodSFTP.NET will write resolved path of the link.

public Sub RealPath(ByVal RemotePath As String)
The RealPath(RemotePath) syntax has these parts:
RemotePathFull path to the symbolic link that should be resolved.

public Sub RealPath(ByVal RemotePath As String, ByVal OutStream As Stream)
The RealPath(RemotePath,OutStream) syntax has these parts:
RemotePathFull path to the symbolic link that should be resolved.
OutStreamOutput Stream where wodSFTP.NET will write resolved path of the link.

Remarks

UNIX operating systems (which are usually running SSH and SFTP servers) have something called 'a link' implemented in their filesystem. Windows have something similar called 'shortcut' but it isn't implemented such nice as on UNIX'es. Those files point to some other file or a directory, and are set by regular users or administrators.

RealPath method will send request to server to 'reveal' information about any such link file. For instance, if you wish to determine if /bin/sh is really an executable file, or it's just a link to /usr/local/bin/bash (typically set on newer UNIXes), you could call this method. After request is completed on the server, ListItems event will be fired containing real path to a filename where /bin/sh points to. It could be /usr/local/bin/bash, it could be /bin/sh (if it is not a link at all) or could be something else. Check it out.

Even you should see such a link files when you initiate ListDir method (they are shown like this: /bin/sh -> /usr/local/bin/bash) , it's possible that this is hidden. It's because some UNIX operating systems (such as Solaris) also support hard links on their filesystem. In that case you are not aware that something is a link at all using regular directory listings.

Platforms

Windows