Zum Hauptinhalt springen
Version: 25.128.1012.1

SFTPProvider

SFTP-Provider

Implementiert​

  • Disposable

Konstruktoren​

new SFTPProvider()​

new SFTPProvider(connectionSettings): SFTPProvider

Initialisiert einen neuen FTP Provider

Parameter​

ParameterTypeDescription
connectionSettingsSFTPConnectionSettingsVerbindungsoptionen

Rückgabewert​

SFTPProvider

Definiert in​

cosmolink.SDK.FTP.ts:872

Methoden​

Dispose()​

Dispose(): void

Standardimplementierung des Dispose

Rückgabewert​

void

Definiert in​

cosmolink.SDK.FTP.ts:1369


[dispose]()​

dispose: void

Standardimplementierung des Dispose Symbols

Rückgabewert​

void

Implementierung von​

Disposable.[dispose]

Definiert in​

cosmolink.SDK.FTP.ts:1375


copyFileAsync()​

copyFileAsync(sourceFilePath, targetFilePath, options)​

copyFileAsync(
sourceFilePath,
targetFilePath,
options?): Promise<void>

Kopiert eine bereits auf dem Server liegende Datei

Parameter​
ParameterTypeDescription
sourceFilePathstringQuellpfad
targetFilePathstringZielpfad
options?objectOptionen
options.remoteExistsOption?SFtpRemoteExistsOptionBestimmt die Handhabung des Kopiervorgangs falls die Zieldatei bereits auf dem Server existiert Standardwert: overwrite
Rückgabewert​

Promise<void>

Throws​

Exception - Löst eine Exception aus, wenn der Vorgang nicht abgeschlossen werden konnte

Definiert in​

cosmolink.SDK.FTP.ts:890

copyFileAsync(sourceDirectoryPath, sourceFileName, targetDirectoryPath, targetFileName, options)​

copyFileAsync(
sourceDirectoryPath,
sourceFileName,
targetDirectoryPath,
targetFileName,
options?): Promise<void>

Kopiert eine bereits auf dem Server liegende Datei

Parameter​
ParameterTypeDescription
sourceDirectoryPathstringQuellverzeichnis
sourceFileNamestringQuelldateiname
targetDirectoryPathstringZielverzeichnis
targetFileNamestringZieldateiname
options?objectOptionen
options.remoteExistsOption?SFtpRemoteExistsOptionBestimmt die Handhabung des Kopiervorgangs falls die Zieldatei bereits auf dem Server existiert Standardwert: overwrite
Rückgabewert​

Promise<void>

Throws​

Exception - Löst eine Exception aus, wenn der Vorgang nicht abgeschlossen werden konnte

Definiert in​

cosmolink.SDK.FTP.ts:911


createDirectoryAsync()​

createDirectoryAsync(directoryPath): Promise<void>

Erstellt ein neuen Ordner

Parameter​

ParameterTypeDescription
directoryPathstringServer - Verzeichnis

Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1004


deleteDirectoryAsync()​

deleteDirectoryAsync(directoryPath): Promise<void>

Löscht ein Verzeichnis

Parameter​

ParameterTypeDescription
directoryPathstringServer - Verzeichnis

Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1140


deleteFileAsync()​

deleteFileAsync(filePath)​

deleteFileAsync(filePath): Promise<void>

Löscht eine Datei

Parameter​
ParameterTypeDescription
filePathstringServer - Dateipfad
Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1150

deleteFileAsync(filePath, fileName)​

deleteFileAsync(filePath, fileName): Promise<void>

Löscht eine Datei

Parameter​
ParameterTypeDescription
filePathstringVerzeichnis
fileNamestringDateiname
Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1158


downloadFileAsync()​

downloadFileAsync(remotePath, localPath, options)​

downloadFileAsync(
remotePath,
localPath,
options?): Promise<void>

Lädt eine Datei in einen bestimmten Pfad herunter

Parameter​
ParameterTypeDescription
remotePathstringServer - Dateipfad
localPathstringLokaler Zielpfad
options?objectDownloadoptionen
options.localExistsOption?SFtpLocalExistsOptionBestimmt die Handhabung des Vorgangs falls die Zieldatei bereits auf dem lokalen System existiert Standardwert: overwrite
options.progressAction?(arg0) => voidAktion die ausgeführt wird um den Fortschritt des Downloads überwachen zu können
Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1208

downloadFileAsync(remoteDirectoryPath, remoteFileName, localPath, options)​

downloadFileAsync(
remoteDirectoryPath,
remoteFileName,
localPath,
options?): Promise<void>

Lädt eine Datei in einen bestimmten Pfad herunter

Parameter​
ParameterTypeDescription
remoteDirectoryPathstringServer - Verzeichnis
remoteFileNamestringServer - Dateiname
localPathstringLokaler Zielpfad
options?objectOptionen
options.localExistsOption?SFtpLocalExistsOptionBestimmt die Handhabung des Vorgangs falls die Zieldatei bereits auf dem lokalen System existiert Standardwert: overwrite
options.progressAction?(arg0) => voidAktion die ausgeführt wird um den Fortschritt des Downloads überwachen zu können
Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1232


downloadFileBytesAsync()​

downloadFileBytesAsync(remotePath, options)​

downloadFileBytesAsync(remotePath, options?): Promise<Uint8Array>

Lädt eine Datei als Bytes herunter

Parameter​
ParameterTypeDescription
remotePathstringServer - Dateipfad
options?objectOptionen
options.progressAction?(arg0) => voidAktion die ausgeführt wird um den Fortschritt des Downloads überwachen zu können
Rückgabewert​

Promise<Uint8Array>

Definiert in​

cosmolink.SDK.FTP.ts:1270

downloadFileBytesAsync(remoteDirectoryPath, remoteFileName, options)​

downloadFileBytesAsync(
remoteDirectoryPath,
remoteFileName,
options?): Promise<Uint8Array>

Lädt eine Datei als Bytes herunter

Parameter​
ParameterTypeDescription
remoteDirectoryPathstringServer - Verzeichnis
remoteFileNamestringServer - Dateiname
options?objectOptionen
options.localExistsOption?SFtpLocalExistsOptionBestimmt die Handhabung des Vorgangs falls die Zieldatei bereits auf dem lokalen System existiert Standardwert: overwrite
options.progressAction?(arg0) => voidAktion die ausgeführt wird um den Fortschritt des Downloads überwachen zu können
Rückgabewert​

Promise<Uint8Array>

Definiert in​

cosmolink.SDK.FTP.ts:1286


fileExistsAsync()​

fileExistsAsync(filePath)​

fileExistsAsync(filePath): Promise<boolean>

Pürft ob eine Datei existiert

Parameter​
ParameterTypeDescription
filePathstringServer - Dateipfad
Rückgabewert​

Promise<boolean>

Definiert in​

cosmolink.SDK.FTP.ts:1178

fileExistsAsync(directoryPath, fileName)​

fileExistsAsync(directoryPath, fileName): Promise<boolean>

Pürft ob eine Datei existiert

Parameter​
ParameterTypeDescription
directoryPathstringVerzeichnis
fileNamestringDateiname
Rückgabewert​

Promise<boolean>

Definiert in​

cosmolink.SDK.FTP.ts:1186


getWorkingDirectory()​

getWorkingDirectory(): string

Gibt das aktuelle WorkingDirectory aus

Rückgabewert​

string

Definiert in​

cosmolink.SDK.FTP.ts:1354


listFilesAsync()​

listFilesAsync(directoryPath, options?): Promise<FileInfo[]>

Gibt Auflistung der Dateien im Verzeichnis zurück

Parameter​

ParameterTypeDescription
directoryPathstringVerzeichnis
options?objectOptionen
options.filter?(arg0) => booleanFilter
options.listOption?SFtpListOptionBestimmt die Verzeichnistiefe für die Suche Standardwert: topDirectoryOnly

Rückgabewert​

Promise<FileInfo[]>

Definiert in​

cosmolink.SDK.FTP.ts:1324


moveFileAsync()​

moveFileAsync(sourceFilePath, targetFilePath, options)​

moveFileAsync(
sourceFilePath,
targetFilePath,
options?): Promise<void>

Verschiebt eine bereits auf dem Server liegende Datei

Parameter​
ParameterTypeDescription
sourceFilePathstringQuellpfad
targetFilePathstringZielpfad
options?objectOptionen
options.remoteExistsOption?SFtpRemoteExistsOptionBestimmt die Handhabung des Verschiebevorgangs falls die Zieldatei bereits auf dem Server existiert Standardwert: overwrite
Rückgabewert​

Promise<void>

Throws​

Exception - Löst eine Exception aus, wenn der Vorgang nicht abgeschlossen werden konnte

Definiert in​

cosmolink.SDK.FTP.ts:949

moveFileAsync(sourceDirectoryPath, sourceFileName, targetDirectoryPath, targetFileName, options)​

moveFileAsync(
sourceDirectoryPath,
sourceFileName,
targetDirectoryPath,
targetFileName,
options?): Promise<void>

Verschiebt eine bereits auf dem Server liegende Datei

Parameter​
ParameterTypeDescription
sourceDirectoryPathstringQuellverzeichnis
sourceFileNamestringQuelldateiname
targetDirectoryPathstringZielverzeichnis
targetFileNamestringZieldateiname
options?objectOptionen
options.remoteExistsOption?SFtpRemoteExistsOptionBestimmt die Handhabung des Verschiebevorgangs falls die Zieldatei bereits auf dem Server existiert Standardwert: overwrite
Rückgabewert​

Promise<void>

Throws​

Exception - Löst eine Exception aus, wenn der Vorgang nicht abgeschlossen werden konnte

Definiert in​

cosmolink.SDK.FTP.ts:970


testAsync()​

testAsync(): Promise<void>

Testet die Verbindung mit dem Server

Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1363


uploadFileAsync()​

uploadFileAsync(localPath, remotePath, options)​

uploadFileAsync(
localPath,
remotePath,
options?): Promise<void>

Lädt eine Datei auf den Server

Parameter​
ParameterTypeDescription
localPathstringLokaler Dateipfad
remotePathstringServer - Dateipfad
options?objectOptionen
options.progressAction?(arg0) => voidAktion die ausgeführt wird um den Fortschritt des Uploads überwachen zu können
options.remoteExistsOption?SFtpRemoteExistsOptionBestimmt die Handhabung des Kopiervorgangs falls die Zieldatei bereits auf dem Server existiert Standardwert: overwrite
Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1016

uploadFileAsync(localPath, remoteDirectoryPath, remoteFileName, options)​

uploadFileAsync(
localPath,
remoteDirectoryPath,
remoteFileName,
options?): Promise<void>

Lädt eine Datei auf den Server

Parameter​
ParameterTypeDescription
localPathstringLokaler Dateipfad
remoteDirectoryPathstringServer - Verzeichnis
remoteFileNamestringServer - Dateiname
options?objectOptionen
options.progressAction?(arg0) => voidAktion die ausgeführt wird um den Fortschritt des Uploads überwachen zu können
options.remoteExistsOption?SFtpRemoteExistsOptionBestimmt die Handhabung des Kopiervorgangs falls die Zieldatei bereits auf dem Server existiert Standardwert: overwrite
Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1040


uploadFileBytesAsync()​

uploadFileBytesAsync(bytes, remotePath, options)​

uploadFileBytesAsync(
bytes,
remotePath,
options?): Promise<void>

Lädt eine Datei auf den Server

Parameter​
ParameterTypeDescription
bytesUint8ArrayDateibytes
remotePathstringServer - Dateipfad
options?objectOptionen
options.progressAction?(arg0) => voidAktion die ausgeführt wird um den Fortschritt des Uploads überwachen zu können
options.remoteExistsOption?SFtpRemoteExistsOptionBestimmt die Handhabung des Kopiervorgangs falls die Zieldatei bereits auf dem Server existiert Standardwert: overwrite
Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1079

uploadFileBytesAsync(bytes, remoteDirectoryPath, remoteFileName, options)​

uploadFileBytesAsync(
bytes,
remoteDirectoryPath,
remoteFileName,
options?): Promise<void>

Lädt eine Datei auf den Server

Parameter​
ParameterTypeDescription
bytesUint8ArrayDateibytes
remoteDirectoryPathstringServer - Verzeichnis
remoteFileNamestringServer - Dateiname
options?objectOptionen
options.progressAction?(arg0) => voidAktion die ausgeführt wird um den Fortschritt des Uploads überwachen zu können
options.remoteExistsOption?SFtpRemoteExistsOptionBestimmt die Handhabung des Kopiervorgangs falls die Zieldatei bereits auf dem Server existiert Standardwert: overwrite
Rückgabewert​

Promise<void>

Definiert in​

cosmolink.SDK.FTP.ts:1103


[hasInstance]()​

static hasInstance: boolean

Symbol.hasInstance welches eine benutzerdefinierte Überprüfung der 'instanceof'-Operation für Objekte ermöglicht.

Parameter​

ParameterType
valueany

Rückgabewert​

boolean

Definiert in​

cosmolink.SDK.FTP.ts:1383