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: *): {"_id": *, "name": *, "type": *, "suffix": *, "fileName": *, "projectId": *, "userId": *, "updated": *, "created": *, "cachebuster": *, "isLibraryFile": *, "__v": *, "size": *, "path": *}

public

getFileIconName(fileDb: *): *

public
public
public

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

public

registerAssetChangeListeners(project: *, removeOthers: boolean)

public

registerOpChangeListeners(opNames: *, removeOthers: boolean)

public

runUnWatched(opName: *, command: *): *

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: *): {"_id": *, "name": *, "type": *, "suffix": *, "fileName": *, "projectId": *, "userId": *, "updated": *, "created": *, "cachebuster": *, "isLibraryFile": *, "__v": *, "size": *, "path": *} source

Params:

NameTypeAttributeDescription
filePath *
user *
project *

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 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 runUnWatched(opName: *, command: *): * source

Params:

NameTypeAttributeDescription
opName *
command *

Return:

*

public async unregisterChangeListeners() source