Home Reference Source

Function

Static Public Summary
public

checkMountpointPermission(req: *, res: *, method: *, readOnly: *, strict: *): *

Checks permissions for given mountpoint

public

createError(code: *, message: *): *

Creates a new custom Error

public

fs(core: Core, options: object): {"save": *, "load": *}

FS Settings adapter

public

getPrefix(path: *)

Gets prefix of a VFS path

public

mountpointResolver(core: *): *

Resolves a mountpoint

public

null(core: Core, options: object)

Null Auth adapter

public

null(core: Core, options: object)

Null Settings adapter

public

parseFields(config: *): *

Middleware for handling HTTP requests

public

sanitize(filename: *): *

Sanitizes a path

public

streamFromRequest(req: *): *

Gets the stream from a HTTP request

public

system(core: Core, options: object): {"watch": *, "capabilities": *, "exists": *, "stat": *, "readdir": *, "readfile": *, "mkdir": *, "writefile": *, "rename": *, "copy": *, "unlink": *, "search": *, "touch": *, "realpath": *}

System VFS adapter

public

validateGroups(userGroups: *, method: *, mountpoint: *, strict: *): boolean

Validates groups

Static Public

public checkMountpointPermission(req: *, res: *, method: *, readOnly: *, strict: *): * source

import {checkMountpointPermission} from '@osjs/server/src/utils/vfs.js'

Checks permissions for given mountpoint

Params:

NameTypeAttributeDescription
req *
res *
method *
readOnly *
strict *

Return:

*

public createError(code: *, message: *): * source

import {createError} from '@osjs/server/src/utils/vfs.js'

Creates a new custom Error

Params:

NameTypeAttributeDescription
code *
message *

Return:

*

public fs(core: Core, options: object): {"save": *, "load": *} source

FS Settings adapter

Params:

NameTypeAttributeDescription
core Core

Core reference

options object
  • optional

Adapter options

Return:

{"save": *, "load": *}

public getPrefix(path: *) source

import {getPrefix} from '@osjs/server/src/utils/vfs.js'

Gets prefix of a VFS path

Params:

NameTypeAttributeDescription
path *

public mountpointResolver(core: *): * source

import {mountpointResolver} from '@osjs/server/src/utils/vfs.js'

Resolves a mountpoint

Params:

NameTypeAttributeDescription
core *

Return:

*

public null(core: Core, options: object) source

Null Auth adapter

Params:

NameTypeAttributeDescription
core Core

Core reference

options object
  • optional

Adapter options

public null(core: Core, options: object) source

Null Settings adapter

Params:

NameTypeAttributeDescription
core Core

Core reference

options object
  • optional

Adapter options

public parseFields(config: *): * source

import {parseFields} from '@osjs/server/src/utils/vfs.js'

Middleware for handling HTTP requests

Params:

NameTypeAttributeDescription
config *

Return:

*

public sanitize(filename: *): * source

import {sanitize} from '@osjs/server/src/utils/vfs.js'

Sanitizes a path

Params:

NameTypeAttributeDescription
filename *

Return:

*

public streamFromRequest(req: *): * source

import {streamFromRequest} from '@osjs/server/src/utils/vfs.js'

Gets the stream from a HTTP request

Params:

NameTypeAttributeDescription
req *

Return:

*

public system(core: Core, options: object): {"watch": *, "capabilities": *, "exists": *, "stat": *, "readdir": *, "readfile": *, "mkdir": *, "writefile": *, "rename": *, "copy": *, "unlink": *, "search": *, "touch": *, "realpath": *} source

System VFS adapter

Params:

NameTypeAttributeDescription
core Core

Core reference

options object
  • optional

Adapter options

Return:

{"watch": *, "capabilities": *, "exists": *, "stat": *, "readdir": *, "readfile": *, "mkdir": *, "writefile": *, "rename": *, "copy": *, "unlink": *, "search": *, "touch": *, "realpath": *}

public validateGroups(userGroups: *, method: *, mountpoint: *, strict: *): boolean source

import {validateGroups} from '@osjs/server/src/utils/vfs.js'

Validates groups

Params:

NameTypeAttributeDescription
userGroups *
method *
mountpoint *
strict *

Return:

boolean