CursorFile

fmgp.did.method.prism.vdr.CursorFile
object CursorFile

Cursor file companion: reads and writes <dir>/.cursor.

The file contains a single JSON object {"b":<int>,"o":<int>} representing the latest (b, o) of an event written to the folder. It allows the exporter to resume incrementally instead of rebuilding from scratch.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CursorFile.type

Members list

Value members

Concrete methods

def path(dir: Path): Path
def read(dir: Path): ZIO[Any, Throwable, Option[EventCursor]]

Reads the cursor file. Returns None if it does not exist. Fails if it exists but is unreadable or malformed.

Reads the cursor file. Returns None if it does not exist. Fails if it exists but is unreadable or malformed.

Attributes

def write(dir: Path, cursor: EventCursor): ZIO[Any, Throwable, Unit]

Writes the cursor file (full overwrite). Creates the parent directory if missing.

Writes the cursor file (full overwrite). Creates the parent directory if missing.

Attributes

Concrete fields

val Name: String

Filename — leading . makes it sort first in lexicographic listings (and hides it from default ls).

Filename — leading . makes it sort first in lexicographic listings (and hides it from default ls).

Attributes