UnsecureFtp

zio.ftp.UnsecureFtp
See theUnsecureFtp companion object
sealed abstract class UnsecureFtp(unsafeClient: Client) extends FtpAccessors[Client]

Unsecure Ftp client wrapper

All ftp methods exposed are lift into ZIO or ZStream The underlying java client only provide blocking methods.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def execute[T](f: Client => T): ZIO[Any, IOException, T]

Lift unsafe operation that does blocking IO into a pure value. If the operation failed an error will be emitted

Lift unsafe operation that does blocking IO into a pure value. If the operation failed an error will be emitted

Type parameters

T

return value

Value parameters

f

unsafe function to lift

Attributes

Definition Classes
def ls(path: String): ZStream[Any, IOException, FtpResource]

List of files / directories. If the operation failed, an error will be emitted

List of files / directories. If the operation failed, an error will be emitted

Value parameters

path

absolute path of the directory

Attributes

List of files from a base directory recursively. If the operation failed, an error will be emitted

List of files from a base directory recursively. If the operation failed, an error will be emitted

Value parameters

path

absolute path of the directory

Attributes

def mkdir(path: String): ZIO[Any, IOException, Unit]

Create a directory. If the operation failed, an error will be emitted

Create a directory. If the operation failed, an error will be emitted

Value parameters

path

absolute path of the directory

Attributes

def readFile(path: String, chunkSize: Int, fileOffset: Long): ZStream[Any, IOException, Byte]

Read a file by using stream. If the operation failed, an error will be emitted

Read a file by using stream. If the operation failed, an error will be emitted

Value parameters

chunkSize

default chunk size is 2048 bytes

fileOffset

optional initial offset in bytes

path

absolute path of a file

Attributes

def rename(oldPath: String, newPath: String): ZIO[Any, IOException, Unit]

Renames a file/directory. If the operation failed, an error will be emitted

Renames a file/directory. If the operation failed, an error will be emitted

Value parameters

newPath

absolute path of the file/directory destination.

oldPath

absolute path of the file/directory to rename

Attributes

def rm(path: String): ZIO[Any, IOException, Unit]

Delete a file on a server. If the operation failed, an error will be emitted

Delete a file on a server. If the operation failed, an error will be emitted

Value parameters

path

absolute path of the file

Attributes

def rmdir(path: String): ZIO[Any, IOException, Unit]

Delete a directory. If the operation failed, an error will be emitted

Delete a directory. If the operation failed, an error will be emitted

Value parameters

path

absolute path of the directory

Attributes

Check existence of a file. If the file doesn't exist, the operation will succeed by returning an empty ftp resource If the operation failed an error will be emitted

Check existence of a file. If the file doesn't exist, the operation will succeed by returning an empty ftp resource If the operation failed an error will be emitted

Value parameters

path

absolute path of the file

Attributes

def upload[R](path: String, source: ZStream[R, Throwable, Byte]): ZIO[R, IOException, Unit]

Save a data stream. If the operation failed, an error will be emitted

Save a data stream. If the operation failed, an error will be emitted

Type parameters

R

environment of the specified stream source, required to extend Blocking

Value parameters

path

absolute path of file to store

source

data stream to store

Attributes