Home Reference Source
public class | source

FilesUtil

You can directly use an instance of this class. filesUtil

Extends:

cables-shared-api~SharedFilesUtil → FilesUtil

Constructor Summary

Public Constructor
public

Member Summary

Private Members
private
private

Method Summary

Public Methods
public

getFileAssetLocation(fileDb: *): *

public

getFileAssetUrlPath(fileDb: *): *

public

getFileDb(filePath: *, user: *, project: *, cachebuster: string): {"_id": *, "name": *, "type": *, "suffix": *, "fileName": *, "projectId": *, "userId": *, "updated": *, "created": *, "cachebuster": *, "isLibraryFile": *, "__v": *, "size": *, "path": *}

public

getFileIconName(fileDb: *): *

public
public
public

isAssetLibraryLocation(filePath: *): *

public

readAssetDir(lvl: *, filePath: *, origPath: *, urlPrefix: string): *

public

registerAssetChangeListeners(project: *, removeOthers: boolean)

public

registerOpChangeListeners(opNames: *, removeOthers: boolean)

public
public

Public Constructors

public constructor() source

Private Members

private _assetChangeWatcher: * source

private _opChangeWatcher: * source

Public Methods

public getFileAssetLocation(fileDb: *): * source

Params:

NameTypeAttributeDescription
fileDb *

Return:

*

public getFileAssetUrlPath(fileDb: *): * source

Params:

NameTypeAttributeDescription
fileDb *

Return:

*

public getFileDb(filePath: *, user: *, project: *, cachebuster: string): {"_id": *, "name": *, "type": *, "suffix": *, "fileName": *, "projectId": *, "userId": *, "updated": *, "created": *, "cachebuster": *, "isLibraryFile": *, "__v": *, "size": *, "path": *} source

Params:

NameTypeAttributeDescription
filePath *
user *
project *
cachebuster string
  • optional
  • default:

Return:

{"_id": *, "name": *, "type": *, "suffix": *, "fileName": *, "projectId": *, "userId": *, "updated": *, "created": *, "cachebuster": *, "isLibraryFile": *, "__v": *, "size": *, "path": *}

public getFileIconName(fileDb: *): * source

Params:

NameTypeAttributeDescription
fileDb *

Return:

*

public getLibraryFiles(): * source

Return:

*

public getPatchFiles(): * source

Return:

*

public isAssetLibraryLocation(filePath: *): * source

Params:

NameTypeAttributeDescription
filePath *

Return:

*

public readAssetDir(lvl: *, filePath: *, origPath: *, urlPrefix: string): * source

Params:

NameTypeAttributeDescription
lvl *
filePath *
origPath *
urlPrefix string
  • optional
  • default:

Return:

*

public registerAssetChangeListeners(project: *, removeOthers: boolean) source

Params:

NameTypeAttributeDescription
project *
removeOthers boolean
  • optional
  • default: false

public registerOpChangeListeners(opNames: *, removeOthers: boolean) source

Params:

NameTypeAttributeDescription
opNames *
removeOthers boolean
  • optional
  • default: false

public async unregisterChangeListeners() source

public unregisterOpChangeListeners(opNames: *) source

Params:

NameTypeAttributeDescription
opNames *