Table of Contents

Class RemotePaths

Namespace
FluentFTP.Helpers
Assembly
FluentFTP.dll

Extension methods related to FTP tasks

public static class RemotePaths
Inheritance
RemotePaths
Inherited Members

Methods

CalculateFullFtpPath(FtpListItem, BaseFtpClient, string)

Get the full path of a given FTP Listing entry

public static void CalculateFullFtpPath(this FtpListItem item, BaseFtpClient client, string path)

Parameters

item FtpListItem
client BaseFtpClient
path string

GetFtpDirectoryName(string)

Gets the parent directory path (formatted for a FTP server)

public static string GetFtpDirectoryName(this string path)

Parameters

path string

The path

Returns

string

The parent directory path

GetFtpFileName(string)

Gets the file name and extension from the path. Supports paths with backslashes and forwardslashes.

public static string GetFtpFileName(this string path)

Parameters

path string

The full path to the file

Returns

string

The file name

GetFtpPath(string)

Converts the specified path into a valid FTP file system path. Replaces invalid back-slashes with valid forward-slashes. Replaces multiple slashes with single slashes. Removes the ending postfix slash if any.

public static string GetFtpPath(this string path)

Parameters

path string

The file system path

Returns

string

A path formatted for FTP

GetFtpPath(string, params string[])

Creates a valid FTP path by appending the specified segments to this string

public static string GetFtpPath(this string path, params string[] segments)

Parameters

path string

This string

segments string[]

The path segments to append

Returns

string

A valid FTP path

GetPathSegments(string)

Converts a Windows or Unix-style path into its segments for segment-wise processing

public static string[] GetPathSegments(this string path)

Parameters

path string

Returns

string[]

IsAbsolutePath(string)

Checks if this FTP path is a top level path

public static bool IsAbsolutePath(this string path)

Parameters

path string

Returns

bool

IsFtpRootDirectory(string)

Checks if the given path is a root directory or working directory path

public static bool IsFtpRootDirectory(this string ftppath)

Parameters

ftppath string

Returns

bool