Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a StorageRegistry that mimics the API of a FileSystemOverlay instance, resolving all path-based operations via URI (my-namespace://path/to/file.txt) parsing. Using the URI protocol as the namespace to lookup, and the URI pathname as the directory / file path

Hierarchy

Index

Constructors

constructor

Properties

EVENT_MOUNTED

EVENT_MOUNTED: IEvent<IRegistryMountEvent<T>> = event<IRegistryMountEvent<T>>()

Event that dispatches whenever a registered IStorage instance is mounted

EVENT_REGISTERED

EVENT_REGISTERED: IEvent<IRegistryRegisterEvent<T>> = event<IRegistryRegisterEvent<T>>()

Event that dispatches whenever a new IStorage instance is registered

EVENT_UNMOUNTED

EVENT_UNMOUNTED: IEvent<IRegistryMountEvent<T>> = event<IRegistryMountEvent<T>>()

Event that dispatches whenever a registered IStorage instance is unmounted

EVENT_UNREGISTERED

EVENT_UNREGISTERED: IEvent<IRegistryRegisterEvent<T>> = event<IRegistryRegisterEvent<T>>()

Event that dispatches whenever a new IStorage instance is unregistered

Readonly size

size: number

Methods

clear

  • clear(): void

create_directory

  • create_directory(uri: string): Promise<void>

create_url_object

  • create_url_object(uri: string): Promise<IURLObject>

delete

  • delete(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

entries

exists

  • exists(uri: string): Promise<boolean>

forEach

get

get_stats

has

  • has(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

read_directory

read_file

  • read_file(uri: string): Promise<Uint8Array>

read_file_json

  • read_file_json<T>(uri: string, reviver?: IJSONReviver): Promise<T>

read_file_text

  • read_file_text(uri: string): Promise<string>

register

remove_directory

remove_file

  • remove_file(uri: string): Promise<void>

resolve

set

unregister

  • unregister(namespace: string): this | Promise<this>

values

watch_directory

watch_file

write_file

  • write_file(uri: string, payload: Uint8Array): Promise<void>
  • Writes a Uint8Array payload to a File. Creating a new File in the File System, if not previously made

    Parameters

    • uri: string
    • payload: Uint8Array

    Returns Promise<void>

write_file_json

  • write_file_json<T>(uri: string, value: T, replacer?: IJSONReplacer, space?: number | string): Promise<void>

write_file_text

  • write_file_text(uri: string, text: string): Promise<void>

Legend

  • Variable
  • Function
  • Type alias
  • Type alias with type parameter
  • Class
  • Class with type parameter
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Interface
  • Interface with type parameter
  • Enumeration

Generated using TypeDoc