Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FileBinary<T>

FileBinary handles the storage of binary on a hard drive

The structure used for now is /folder/{hash}/data /folder/{hash}/{targetStore}_{uuid} /folder/{hash}/challenge

It takes one parameter folder: "path"

See Binary the general interface

Type parameters

Hierarchy

Constructors

Properties

_createException: string
_initException: any = undefined
_initTime: number
_lowercaseMaps: any
_name: string

Service name

_webda: Core

Webda Core object

logger: Logger

Logger with class context

parameters: T

Hold the parameters for your service

It will be bring from the webda.config.json

defaultMaxListeners: number

Methods

  • ___cleanData(): Promise<void>
  • __clean(): Promise<any>
  • _checkMap(name: any, property: any): void
  • _cleanHash(hash: any): void
  • _cleanUsage(hash: any, uuid: any): void
  • _get(info: any): ReadableStream<any>
  • _getFile(req: any): any
  • _getHashes(buffer: any): any
  • _getPath(hash: any, postfix?: any): string
  • _getUrl(info: any, ctx: Context): void
  • _initRoutes(): boolean
  • _prepareInput(file: any): void
  • _store(file: any, targetStore: any, object: any): void
  • _touch(path: any): void
  • _validChallenge(challenge: any): boolean
  • addListener(event: string | symbol, listener: function): this
  • addRoute(url: string, methods: HttpMethodType[], executer: Function, openapi?: object, allowPath?: boolean): void
  • cascadeDelete(info: any, uuid: any): void
  • challenge(hash: any, challenge: any): boolean
  • computeParameters(): void
  • delete(targetStore: any, object: any, property: any, index: any): any
  • deleteSuccess(targetStore: any, object: any, property: any, index: any): any
  • downloadTo(info: any, filename: any): Promise<void>
  • emit(event: string | symbol, ...args: any[]): boolean
  • emitSync(event: any, data: any): Promise<any[]>
  • eventNames(): Array<string | symbol>
  • get(info: any): Promise<ReadableStream<any>>
  • getMaxListeners(): number
  • getName(): string
  • getParameters(): T
  • getService<T>(service: string): T
  • getUsageCount(hash: any): Promise<number>
  • httpChallenge(ctx: Context): Promise<void>
  • httpPost(ctx: Context): Promise<void>
  • httpRoute(ctx: Context): Promise<void>
  • initMap(map: any): void
  • initRoutes(): void
  • listenerCount(type: string | symbol): number
  • listeners(event: string | symbol): Function[]
  • off(event: string | symbol, listener: function): this
  • on(event: string | symbol, listener: function): this
  • onAsync(event: any, callback: any, queue?: string): void
  • Listen to an event as on(...) would do except that it will be asynchronous

    Parameters

    • event: any
    • callback: any
    • Default value queue: string = undefined

      Name of queue to use, can be undefined, queue name are used to define differents priorities

    Returns void

  • once(event: string | symbol, listener: function): this
  • prependListener(event: string | symbol, listener: function): this
  • prependOnceListener(event: string | symbol, listener: function): this
  • rawListeners(event: string | symbol): Function[]
  • reinit(config: any): Promise<void>
  • removeAllListeners(event?: string | symbol): this
  • removeListener(event: string | symbol, listener: function): this
  • resolve(): void
  • setMaxListeners(n: number): this
  • store(targetStore: any, object: any, property: any, file: any, metadatas: any, index?: string): Promise<any>
  • toPublicJSON(object: any): string
  • update(targetStore: any, object: any, property: any, index: any, file: any, metadatas: any): Promise<any>
  • updateSuccess(targetStore: any, object: any, property: any, index: any, file: any, metadatas: any): Promise<any>
  • listenerCount(emitter: EventEmitter, event: string | symbol): number

Generated using TypeDoc