Skip to content

CapacitorAdapter

Defined in: obsidian.d.ts:583

Implementation of the vault adapter for mobile devices.

Extends

Implements

Constructors

new CapacitorAdapter()

new CapacitorAdapter(): CapacitorAdapter

Returns

CapacitorAdapter

Properties

basePath

basePath: string

Defined in: src/obsidian/augmentations/DataAdapter.d.ts:13

Base OS path for the vault (e.g. /home/user/vault, or C:\Users\user\documents\vault)

Implementation of

DataAdapter.basePath

Inherited from

DataAdapter.basePath


files

files: DataAdapterFilesRecord

Defined in: src/obsidian/augmentations/DataAdapter.d.ts:17

Mapping of file/folder path to vault entry, includes non-MD files

Implementation of

DataAdapter.files

Inherited from

DataAdapter.files


fs

fs: CapacitorAdapterFs

Defined in: src/obsidian/augmentations/CapacitorAdapter.d.ts:9


promise

promise: Promise<unknown>

Defined in: src/obsidian/internals/PromisedQueue.d.ts:3

Implementation of

DataAdapter.promise

Inherited from

DataAdapter.promise

Methods

_exists()

_exists(fullPath, sensitive?): Promise<boolean>

Defined in: src/obsidian/augmentations/DataAdapter.d.ts:32

Check if a file exists.

Parameters

fullPath

string

Full path to the file.

sensitive?

boolean

Whether to check case-sensitive.

Returns

Promise<boolean>

A promise that resolves to true if the file exists, false otherwise.

Implementation of

DataAdapter._exists

Inherited from

DataAdapter._exists


append()

append(normalizedPath, data, options?): Promise<void>

Defined in: obsidian.d.ts:625

Parameters

normalizedPath

string

data

string

options?

DataWriteOptions

Returns

Promise<void>

Implementation of

DataAdapter.append

Inherited from

DataAdapter.append


copy()

copy(normalizedPath, normalizedNewPath): Promise<void>

Defined in: obsidian.d.ts:647

Parameters

normalizedPath

string

normalizedNewPath

string

Returns

Promise<void>

Implementation of

DataAdapter.copy

Inherited from

DataAdapter.copy


exists()

exists(normalizedPath, sensitive?): Promise<boolean>

Defined in: obsidian.d.ts:651

Parameters

normalizedPath

string

sensitive?

boolean

Returns

Promise<boolean>

Implementation of

DataAdapter.exists

Inherited from

DataAdapter.exists


getFullPath()

getFullPath(normalizedPath): string

Defined in: obsidian.d.ts:665

Parameters

normalizedPath

string

Returns

string

Implementation of

DataAdapter.getFullPath

Inherited from

DataAdapter.getFullPath


getFullRealPath()

getFullRealPath(normalizedPath): string

Defined in: src/obsidian/augmentations/DataAdapter.d.ts:46

Get canonical full path of file.

Parameters

normalizedPath

string

Normalized path to file.

Returns

string

String full path to file.

Implementation of

DataAdapter.getFullRealPath

Inherited from

DataAdapter.getFullRealPath


getName()

getName(): string

Defined in: obsidian.d.ts:588

Returns

string

Implementation of

DataAdapter.getName

Inherited from

DataAdapter.getName


getNativePath()

getNativePath(normalizedPath): string

Defined in: src/obsidian/augmentations/CapacitorAdapter.d.ts:11

Parameters

normalizedPath

string

Returns

string


getRealPath()

getRealPath(path): string

Defined in: src/obsidian/augmentations/DataAdapter.d.ts:55

Get normalized path. For vault-relative path, it’s normalized vault-relative path. For absolute path, it’s path as is.

Parameters

path

string

Path to file.

Returns

string

Normalized path.

Implementation of

DataAdapter.getRealPath

Inherited from

DataAdapter.getRealPath


getResourcePath()

getResourcePath(normalizedPath): string

Defined in: obsidian.d.ts:633

Parameters

normalizedPath

string

Returns

string

Implementation of

DataAdapter.getResourcePath

Inherited from

DataAdapter.getResourcePath


list()

list(normalizedPath): Promise<ListedFiles>

Defined in: obsidian.d.ts:660

Parameters

normalizedPath

string

Returns

Promise<ListedFiles>

Implementation of

DataAdapter.list

Inherited from

DataAdapter.list


mkdir()

mkdir(normalizedPath): Promise<void>

Defined in: obsidian.d.ts:593

Parameters

normalizedPath

string

Returns

Promise<void>

Implementation of

DataAdapter.mkdir

Inherited from

DataAdapter.mkdir


open()

open(normalizedPath): Promise<void>

Defined in: src/obsidian/augmentations/CapacitorAdapter.d.ts:18

Parameters

normalizedPath

string

Returns

Promise<void>


process()

process(normalizedPath, fn, options?): Promise<string>

Defined in: obsidian.d.ts:629

Parameters

normalizedPath

string

fn

(data) => string

options?

DataWriteOptions

Returns

Promise<string>

Implementation of

DataAdapter.process

Inherited from

DataAdapter.process


queue()

queue<T>(fn): Promise<T>

Defined in: src/obsidian/internals/PromisedQueue.d.ts:5

Type Parameters

T

Parameters

fn

() => T | Promise<T>

Returns

Promise<T>

Implementation of

DataAdapter.queue

Inherited from

DataAdapter.queue


quickList()

quickList(normalizedFolderPath, fileEntry): void

Defined in: src/obsidian/augmentations/CapacitorAdapter.d.ts:19

Parameters

normalizedFolderPath

string

fileEntry

FileEntry

Returns

void


read()

read(normalizedPath): Promise<string>

Defined in: obsidian.d.ts:609

Parameters

normalizedPath

string

Returns

Promise<string>

Implementation of

DataAdapter.read

Inherited from

DataAdapter.read


readBinary()

readBinary(normalizedPath): Promise<ArrayBuffer>

Defined in: obsidian.d.ts:613

Parameters

normalizedPath

string

Returns

Promise<ArrayBuffer>

Implementation of

DataAdapter.readBinary

Inherited from

DataAdapter.readBinary


reconcileFileChanged()

reconcileFileChanged(realFilePath, normalizedPath, fileEntry): void

Defined in: src/obsidian/augmentations/CapacitorAdapter.d.ts:20

Parameters

realFilePath

string

normalizedPath

string

fileEntry

FileEntry

Returns

void


reconcileFileCreation()

reconcileFileCreation(normalizedPath, normalizedNewPath, fileEntry): Promise<void>

Defined in: src/obsidian/augmentations/CapacitorAdapter.d.ts:21

Parameters

normalizedPath

string

normalizedNewPath

string

fileEntry

CapacitorFileEntry

Returns

Promise<void>


remove()

remove(normalizedPath): Promise<void>

Defined in: obsidian.d.ts:638

Parameters

normalizedPath

string

Returns

Promise<void>

Implementation of

DataAdapter.remove

Inherited from

DataAdapter.remove


rename()

rename(normalizedPath, normalizedNewPath): Promise<void>

Defined in: obsidian.d.ts:643

Parameters

normalizedPath

string

normalizedNewPath

string

Returns

Promise<void>

Implementation of

DataAdapter.rename

Inherited from

DataAdapter.rename


rmdir()

rmdir(normalizedPath, recursive): Promise<void>

Defined in: obsidian.d.ts:605

Parameters

normalizedPath

string

recursive

boolean

Returns

Promise<void>

Implementation of

DataAdapter.rmdir

Inherited from

DataAdapter.rmdir


stat()

stat(normalizedPath): Promise<null | Stat>

Defined in: obsidian.d.ts:656

Parameters

normalizedPath

string

Returns

Promise<null | Stat>

Implementation of

DataAdapter.stat

Inherited from

DataAdapter.stat


trashLocal()

trashLocal(normalizedPath): Promise<void>

Defined in: obsidian.d.ts:601

Parameters

normalizedPath

string

Returns

Promise<void>

Implementation of

DataAdapter.trashLocal

Inherited from

DataAdapter.trashLocal


trashSystem()

trashSystem(normalizedPath): Promise<boolean>

Defined in: obsidian.d.ts:597

Parameters

normalizedPath

string

Returns

Promise<boolean>

Implementation of

DataAdapter.trashSystem

Inherited from

DataAdapter.trashSystem


watchAndList()

watchAndList(): Promise<void>

Defined in: src/obsidian/augmentations/CapacitorAdapter.d.ts:30

Returns

Promise<void>


write()

write(normalizedPath, data, options?): Promise<void>

Defined in: obsidian.d.ts:617

Parameters

normalizedPath

string

data

string

options?

DataWriteOptions

Returns

Promise<void>

Implementation of

DataAdapter.write

Inherited from

DataAdapter.write


writeBinary()

writeBinary(normalizedPath, data, options?): Promise<void>

Defined in: obsidian.d.ts:621

Parameters

normalizedPath

string

data

ArrayBuffer

options?

DataWriteOptions

Returns

Promise<void>

Implementation of

DataAdapter.writeBinary

Inherited from

DataAdapter.writeBinary