StoreOps

class StoreOps[F[_], B](store: Store[F, B])(using evidence$1: Sync[F], evidence$2: ContextShift[F])

This object contains shared implementations of functions that requires additional capabilities from the effect type

class Object
trait Matchable
class Any

Value members

Concrete methods

def bufferedPut[A](url: Url[A], overwrite: Boolean, chunkSize: Int, blocker: Blocker): (F, Byte) => Unit

Put sink that buffers all incoming bytes to local filesystem, computes buffered data size, then puts bytes to store. Useful when uploading data to stores that require content size like S3Store.

Put sink that buffers all incoming bytes to local filesystem, computes buffered data size, then puts bytes to store. Useful when uploading data to stores that require content size like S3Store.

Value parameters:
url

Path to write to

Returns:

Sink[F, Byte] buffered sink

def getContents[A](url: Url[A], chunkSize: Int): F[String]

getContents with default UTF8 decoder

getContents with default UTF8 decoder

Value parameters:
url

Url to get

Returns:

F[String] with file contents

def getContents[A](url: Url[A], chunkSize: Int, decoder: (F, Byte) => String): F[String]

Decode get bytes from path into a string using decoder and return concatenated string.

Decode get bytes from path into a string using decoder and return concatenated string.

USE WITH CARE, this loads all file contents into memory.

Value parameters:
decoder

Pipe[F, Byte, String]

url

Path to get

Returns:

F[String] with file contents

def getToNio[A](src: Url[A], dst: Path, chunkSize: Int, blocker: Blocker): F[Unit]

get src path and write to local file system

get src path and write to local file system

Value parameters:
dst

local file to write contents to

src

Path to get

Returns:

F[Unit]

def listAll[A](url: Url[A], recursive: Boolean): F[List[Url[B]]]

Collect all list results in the same order as the original list Stream

Collect all list results in the same order as the original list Stream

Value parameters:
url

Url to list

Returns:

F[List[Url]] with all items in the result

def putContent[A](url: Url[A], content: String): F[Unit]
def putFromNio[A](src: Path, dst: Url[A], overwrite: Boolean, blocker: Blocker): F[Unit]

Write contents of src file into dst Path

Write contents of src file into dst Path

Value parameters:
dst

Path to write to

src

java.nio.file.Path

Returns:

F[Unit]

def removeAll[A](url: Url[A])(implicit ev: B <:< FsObject): F[Int]

Remove all files from a store recursively, given a path

Remove all files from a store recursively, given a path

def transferTo[BB, A, C](dstStore: Store[F, BB], srcUrl: Url[A], dstUrl: Url[C]): F[Int]

Copy value of the given path in this store to the destination store.

Copy value of the given path in this store to the destination store.

This method will list item at srcUrl and copy it to dstUrl in dstStore. If srcUrl points to a directory, it will copy files inside recursively.

Value parameters:
dstStore

destination store

dstUrl

url to transfer to (if srcUrl points to a directory, interpreted as a prefix)

srcUrl

url to transfer from (can be a path to a file or directory)

Returns:

F[Int] number of files transferred