Class VirtualFileLink
Source: virtualFileLink.ts
A link that points to a virtual file
Extends
Accessors
absolutePath
Get Signature
get absolutePath():
string
Returns path without using any aliases
Returns
string
Inherited from
canBeEdited
Get Signature
get canBeEdited():
boolean
Returns whether this can be edited in its current state
Returns
boolean
Inherited from
displayPath
Get Signature
get displayPath():
string
Returns path without using this item's alias
Returns
string
Inherited from
id
Get Signature
get id():
string
Returns
string
Overrides
path
Get Signature
get path():
string
Returns the path of this item
Returns
string
Inherited from
Constructors
Constructor
new VirtualFileLink(
name:string,linkedFile?:VirtualFile):VirtualFileLink
Parameters
name
string
linkedFile?
Returns
VirtualFileLink
Overrides
Methods
confirmChanges()
confirmChanges(
root?:VirtualRoot):void
Parameters
root?
Returns
void
Inherited from
delete()
delete():
void
Tries to delete this item
Returns
void
Inherited from
download()
download():
void
Returns
void
Inherited from
emit()
emit<
Key>(eventName:Key,data?:unknown):void
Dispatch event
Type Parameters
Key
Key extends string
Parameters
eventName
Key
data?
unknown
Returns
void
Inherited from
getIconUrl()
getIconUrl(...
args: []):string
Parameters
args
...[]
Returns
string
Overrides
getRoot()
getRoot():
VirtualRoot
Returns the root folder
Returns
Inherited from
getType()
getType():
string
Returns
string
Inherited from
isDownloadable()
isDownloadable():
boolean
Returns
boolean
Inherited from
isFile()
isFile():
boolean
Returns
boolean
Inherited from
isFolder()
isFolder():
boolean
Returns
boolean
Inherited from
isValid()
isValid():
boolean
Returns
boolean
off()
off<
Key>(eventName:Key,callback:Listener):void
Remove event listener for an event
Type Parameters
Key
Key extends string
Parameters
eventName
Key
callback
Returns
void
Inherited from
on()
Add event listener for an event
Type Parameters
Key
Key extends string
Parameters
eventName
Key
callback
Returns
Inherited from
open()
open(...
args: [WindowsManager]):object|null
Opens this file in an app associated with its extension
Parameters
args
...[WindowsManager]
Returns
object | null
Overrides
read()
read(...
args: []):Promise<string|null|undefined>
Parameters
args
...[]
Returns
Promise<string | null | undefined>
Overrides
removeFileScheme()
staticremoveFileScheme(source:string):string
Parameters
source
string
Returns
string
Inherited from
setAlias()
setAlias(...
args: [string]):VirtualFileLink
Parameters
args
...[string]
Returns
VirtualFileLink
Overrides
setContent()
setContent(...
args: [string|string[]]):VirtualFileLink
Sets the content of this file and removes the source
Parameters
args
...[string | string[]]
Returns
VirtualFileLink
Overrides
setIconUrl()
setIconUrl(
iconUrl:string|null):this
Parameters
iconUrl
string | null
Returns
this
Inherited from
setLinkedFile()
setLinkedFile(
file:VirtualFile):VirtualFileLink
Parameters
file
Returns
VirtualFileLink
setLinkedPath()
setLinkedPath(
path:string):VirtualFileLink
Parameters
path
string
Returns
VirtualFileLink
setName()
setName(
name:string):this
Parameters
name
string
Returns
this
Inherited from
setParent()
setParent(
parent:VirtualFolder):this
Parameters
parent
Returns
this
Inherited from
setProtected()
setProtected(
value:boolean):this
Parameters
value
boolean
Returns
this
Inherited from
setSource()
setSource(...
args: [string]):VirtualFileLink
Sets the source of this file and removes the content
Parameters
args
...[string]
Returns
VirtualFileLink
Overrides
splitId()
staticsplitId(id:string): {extension:OptionalStringProperty;name:string; }
Parameters
id
string
Returns
{ extension: OptionalStringProperty; name: string; }
extension
extension:
OptionalStringProperty
name
name:
string
Inherited from
toJSON()
toJSON():
VirtualFileLinkJson|null
Returns
VirtualFileLinkJson | null
Overrides
toString()
toString():
string|null
Returns a string representation of an object.
Returns
string | null
Inherited from
Properties
alias
alias:
string|null|undefined
The alias of this item
Inherited from
content
content:
OptionalStringProperty
The content of this file
Inherited from
editedByUser
editedByUser:
boolean|null|undefined
Whether this item has been edited by the user
Inherited from
EVENT_NAMES
staticEVENT_NAMES: {contentChange:string;update:string; }
contentChange
contentChange:
string="contentchange"
update
update:
string="update"
Inherited from
extension
extension:
OptionalStringProperty
The extension of this file
Inherited from
iconUrl
iconUrl:
string|null|undefined
The URL of the icon of this item
Inherited from
isDeleted
isDeleted:
boolean
Whether this item has been deleted
Inherited from
isProtected
isProtected:
boolean|null|undefined
Whether this item is protected from changes
Inherited from
isRoot
isRoot:
boolean|null|undefined
Whether this item is the root folder
Inherited from
linkedFile
linkedFile:
VirtualFile|null|undefined
The file this item links to
Inherited from
linkedFolder
linkedFolder:
VirtualFolder|null|undefined
The folder this item links to
Inherited from
linkedPath?
optionallinkedPath:string
name
name:
string
The name of this item
Inherited from
NON_TEXT_EXTENSIONS
staticNON_TEXT_EXTENSIONS:string[]
Inherited from
VirtualFile.NON_TEXT_EXTENSIONS
parent
parent:
VirtualFolder|null|undefined
The folder this item is in
Inherited from
root
root:
VirtualRoot|null|undefined
The root folder
Inherited from
source
source:
OptionalStringProperty
The URL of the source of this file