JS API Reference

Class: GftpServerAdapter

shared/storage/GftpServerAdapter.GftpServerAdapter

This class provides GFTP based implementation of the IFileServer interface used in the SDK

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new GftpServerAdapter(storage): GftpServerAdapter

Parameters

NameType
storageStorageProvider

Returns

GftpServerAdapter

Defined in

src/shared/storage/GftpServerAdapter.ts:13

Methods

publishFile

publishFile(sourcePath): Promise<{ fileUrl: string ; fileHash: string }>

Exposes a file that can be accessed via Golem Network and GFTP

Parameters

NameType
sourcePathstring

Returns

Promise<{ fileUrl: string ; fileHash: string }>

Implementation of

IFileServer.publishFile

Defined in

src/shared/storage/GftpServerAdapter.ts:15


isServing

isServing(): boolean

Tells if the server is currently serving any files

Returns

boolean

Implementation of

IFileServer.isServing

Defined in

src/shared/storage/GftpServerAdapter.ts:37


getPublishInfo

getPublishInfo(sourcePath): undefined | FileServerEntry

Returns publishing information for a file that has been already served

Parameters

NameType
sourcePathstring

Returns

undefined | FileServerEntry

Implementation of

IFileServer.getPublishInfo

Defined in

src/shared/storage/GftpServerAdapter.ts:41


isFilePublished

isFilePublished(sourcePath): boolean

Tells if the file was already published on the server

Parameters

NameType
sourcePathstring

Returns

boolean

Implementation of

IFileServer.isFilePublished

Defined in

src/shared/storage/GftpServerAdapter.ts:45

Was this helpful?