FileSystemAdapter
Implementation of the vault adapter for desktop.
Extends
Implements
Constructors
new FileSystemAdapter()
new FileSystemAdapter():
FileSystemAdapter
Returns
Properties
basePath
basePath:
string
Base OS path for the vault (e.g. /home/user/vault, or C:\Users\user\documents\vault)
Implementation of
Inherited from
files
files:
DataAdapterFilesRecord
Mapping of file/folder path to vault entry, includes non-MD files
Implementation of
Inherited from
fs
fs:
__module
Reference to node fs module
fsPromises
fsPromises:
__module
Reference to node fs:promises module
ipcRenderer?
optional
ipcRenderer:IpcRenderer
Reference to electron ipcRenderer module
path
path:
PlatformPath
Reference to node path module
url
url:
URL
Reference to node URL module
Methods
append()
append(
normalizedPath
,data
,options
?):Promise
<void
>
Parameters
• normalizedPath: string
• data: string
• options?: DataWriteOptions
Returns
Promise
<void
>
Implementation of
Inherited from
copy()
copy(
normalizedPath
,normalizedNewPath
):Promise
<void
>
Parameters
• normalizedPath: string
• normalizedNewPath: string
Returns
Promise
<void
>
Implementation of
Inherited from
exists()
exists(
normalizedPath
,sensitive
?):Promise
<boolean
>
Parameters
• normalizedPath: string
• sensitive?: boolean
Returns
Promise
<boolean
>
Implementation of
Inherited from
getBasePath()
getBasePath()
getBasePath():
string
Returns
string
getBasePath()
getBasePath():
string
Get base path of vault (OS path)
Returns
string
getFilePath()
getFilePath(normalizedPath)
getFilePath(
normalizedPath
):string
Returns the file:// path of this file
Parameters
• normalizedPath: string
Returns
string
getFilePath(normalizedPath)
getFilePath(
normalizedPath
):string
Get full path of file (OS path)
Parameters
• normalizedPath: string
Path to file
Returns
string
URL path to file
getFullPath()
getFullPath(
normalizedPath
):string
Parameters
• normalizedPath: string
Returns
string
Implementation of
Inherited from
getFullRealPath()
getFullRealPath(
normalizedPath
):string
Get full path of file (OS path)
Parameters
• normalizedPath: string
Path to file
Returns
string
String full path to file
Implementation of
Inherited from
getName()
getName():
string
Returns
string
Implementation of
Inherited from
getResourcePath()
getResourcePath(
normalizedPath
):string
Parameters
• normalizedPath: string
Returns
string
Implementation of
Inherited from
list()
list(
normalizedPath
):Promise
<ListedFiles
>
Parameters
• normalizedPath: string
Returns
Implementation of
Inherited from
mkdir()
mkdir(
normalizedPath
):Promise
<void
>
Parameters
• normalizedPath: string
Returns
Promise
<void
>
Implementation of
Inherited from
process()
process(
normalizedPath
,fn
,options
?):Promise
<string
>
Parameters
• normalizedPath: string
• fn
• options?: DataWriteOptions
Returns
Promise
<string
>
Implementation of
Inherited from
queue()
queue(
next
):Promise
<void
>
Parameters
• next
Returns
Promise
<void
>
Implementation of
Inherited from
read()
read(
normalizedPath
):Promise
<string
>
Parameters
• normalizedPath: string
Returns
Promise
<string
>
Implementation of
Inherited from
readBinary()
readBinary(
normalizedPath
):Promise
<ArrayBuffer
>
Parameters
• normalizedPath: string
Returns
Implementation of
Inherited from
remove()
remove(
normalizedPath
):Promise
<void
>
Parameters
• normalizedPath: string
Returns
Promise
<void
>
Implementation of
Inherited from
rename()
rename(
normalizedPath
,normalizedNewPath
):Promise
<void
>
Parameters
• normalizedPath: string
• normalizedNewPath: string
Returns
Promise
<void
>
Implementation of
Inherited from
rmdir()
rmdir(
normalizedPath
,recursive
):Promise
<void
>
Parameters
• normalizedPath: string
• recursive: boolean
Returns
Promise
<void
>
Implementation of
Inherited from
stat()
Parameters
• normalizedPath: string
Returns
Implementation of
Inherited from
trashLocal()
trashLocal(
normalizedPath
):Promise
<void
>
Parameters
• normalizedPath: string
Returns
Promise
<void
>
Implementation of
Inherited from
trashSystem()
trashSystem(
normalizedPath
):Promise
<boolean
>
Parameters
• normalizedPath: string
Returns
Promise
<boolean
>
Implementation of
Inherited from
write()
write(
normalizedPath
,data
,options
?):Promise
<void
>
Parameters
• normalizedPath: string
• data: string
• options?: DataWriteOptions
Returns
Promise
<void
>
Implementation of
Inherited from
writeBinary()
writeBinary(
normalizedPath
,data
,options
?):Promise
<void
>
Parameters
• normalizedPath: string
• data: ArrayBuffer
• options?: DataWriteOptions
Returns
Promise
<void
>
Implementation of
Inherited from
mkdir()
static
mkdir(path
):Promise
<void
>
Parameters
• path: string
Returns
Promise
<void
>
readLocalFile()
static
readLocalFile(path
):Promise
<ArrayBuffer
>
Parameters
• path: string