Class FtpFileStream
Stream object for the local files
public static class FtpFileStream
- Inheritance
-
FtpFileStream
- Inherited Members
Methods
GetFileDateModifiedUtc(string)
Returns the file size using synchronous file I/O.
public static DateTime GetFileDateModifiedUtc(string localPath)
Parameters
localPath
string
Returns
GetFileDateModifiedUtcAsync(string, CancellationToken)
Returns the file size using synchronous file I/O.
public static Task<DateTime> GetFileDateModifiedUtcAsync(string localPath, CancellationToken token)
Parameters
localPath
stringtoken
CancellationToken
Returns
GetFileReadStream(BaseFtpClient, string, bool, long, long)
Returns a new stream to upload a file from disk. If the file fits within the fileSizeLimit, then it is read in a single disk call and stored in memory, and a MemoryStream is returned. If it is larger than that, then a regular read-only FileStream is returned.
public static Stream GetFileReadStream(BaseFtpClient client, string localPath, bool isAsync, long fileSizeLimit, long knownLocalFileSize = 0)
Parameters
client
BaseFtpClientlocalPath
stringisAsync
boolfileSizeLimit
longknownLocalFileSize
long
Returns
GetFileSize(string, bool)
Returns the file size using synchronous file I/O.
public static long GetFileSize(string localPath, bool checkExists)
Parameters
Returns
GetFileSizeAsync(string, bool, CancellationToken)
Returns the file size using async file I/O.
public static Task<long> GetFileSizeAsync(string localPath, bool checkExists, CancellationToken token)
Parameters
localPath
stringcheckExists
booltoken
CancellationToken
Returns
GetFileWriteStream(BaseFtpClient, string, bool, long, long, bool, long)
Returns a new stream to download a file to disk. If the file fits within the fileSizeLimit, then a new MemoryStream is returned. If it is larger than that, then a regular writable FileStream is returned.
public static Stream GetFileWriteStream(BaseFtpClient client, string localPath, bool isAsync, long fileSizeLimit, long knownRemoteFileSize = 0, bool isAppend = false, long restartPos = 0)
Parameters
client
BaseFtpClientlocalPath
stringisAsync
boolfileSizeLimit
longknownRemoteFileSize
longisAppend
boolrestartPos
long