File sync for Logseq
npm install @logseq/capacitor-file-syncLogseq Sync for mobile platforms.
``bashrun the following in capacitor-file-sync/ folder
yarn link
Install
`bash
npm install @logseq/capacitor-file-sync
npx cap sync
`API Doc
keygen()
* setEnv(...)
* encryptFnames(...)
* decryptFnames(...)
* getLocalFilesMeta(...)
* getLocalAllFilesMeta(...)
* deleteLocalFiles(...)
* fetchRemoteFiles(...)
* updateLocalFiles(...)
* updateLocalVersionFiles(...)
* deleteRemoteFiles(...)
* updateRemoteFiles(...)
* encryptWithPassphrase(...)
* decryptWithPassphrase(...)
* cancelAllRequests(...)
$3
`typescript
keygen() => Promise<{ secretKey: string; publicKey: string; }>
`Returns: Promise<{ secretKey: string; publicKey: string; }>
--------------------
$3
`typescript
setEnv(options: { graphUUID: string; env: string; secretKey: string; publicKey: string; }) => Promise
`| Param | Type |
| ------------- | -------------------------------------------------------------------------------------- |
|
options | { graphUUID: string; env: string; secretKey: string; publicKey: string; } |--------------------
$3
`typescript
encryptFnames(options: { graphUUID: string; filePaths: string[]; }) => Promise<{ value: string[]; }>
`| Param | Type |
| ------------- | -------------------------------------------------------- |
|
options | { graphUUID: string; filePaths: string[]; } |Returns: Promise<{ value: string[]; }>
--------------------
$3
`typescript
decryptFnames(options: { graphUUID: string; filePaths: string[]; }) => Promise<{ value: string[]; }>
`| Param | Type |
| ------------- | -------------------------------------------------------- |
|
options | { graphUUID: string; filePaths: string[]; } |Returns: Promise<{ value: string[]; }>
--------------------
$3
`typescript
getLocalFilesMeta(options: { graphUUID: string; basePath: string; filePaths: string[]; }) => Promise<{ result: any[]; }>
`| Param | Type |
| ------------- | -------------------------------------------------------------------------- |
|
options | { graphUUID: string; basePath: string; filePaths: string[]; } |Returns: Promise<{ result: any[]; }>
--------------------
$3
`typescript
getLocalAllFilesMeta(options: { graphUUID: string; basePath: string; }) => Promise<{ result: any[]; }>
`| Param | Type |
| ------------- | ----------------------------------------------------- |
|
options | { graphUUID: string; basePath: string; } |Returns: Promise<{ result: any[]; }>
--------------------
$3
`typescript
deleteLocalFiles(options: { graphUUID: string; basePath: string; filePaths: string[]; }) => Promise
`| Param | Type |
| ------------- | -------------------------------------------------------------------------- |
|
options | { graphUUID: string; basePath: string; filePaths: string[]; } |--------------------
$3
`typescript
fetchRemoteFiles(options: { graphUUID: string; basePath: string; filePaths: string[]; token: string; }) => Promise
`| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------- |
|
options | { graphUUID: string; basePath: string; filePaths: string[]; token: string; } |--------------------
$3
`typescript
updateLocalFiles(options: { graphUUID: string; basePath: string; filePaths: string[]; token: string; }) => Promise
`| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------- |
|
options | { graphUUID: string; basePath: string; filePaths: string[]; token: string; } |--------------------
$3
`typescript
updateLocalVersionFiles(options: { graphUUID: string; basePath: string; filePaths: string[]; token: string; }) => Promise
`| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------- |
|
options | { graphUUID: string; basePath: string; filePaths: string[]; token: string; } |--------------------
$3
`typescript
deleteRemoteFiles(options: { graphUUID: string; filePaths: string[]; token: string; txid: number; }) => Promise<{ txid: number; }>
`| Param | Type |
| ------------- | ------------------------------------------------------------------------------------- |
|
options | { graphUUID: string; filePaths: string[]; token: string; txid: number; } |Returns: Promise<{ txid: number; }>
--------------------
$3
`typescript
updateRemoteFiles(options: { graphUUID: string; basePath: string; filePaths: string[]; token: string; txid: number; }) => Promise<{ txid: number; }>
`| Param | Type |
| ------------- | ------------------------------------------------------------------------------------------------------- |
|
options | { graphUUID: string; basePath: string; filePaths: string[]; token: string; txid: number; } |Returns: Promise<{ txid: number; }>
--------------------
$3
`typescript
encryptWithPassphrase(options: { passphrase: string; content: string; }) => Promise<{ data: string; }>
`| Param | Type |
| ------------- | ----------------------------------------------------- |
|
options | { passphrase: string; content: string; } |Returns: Promise<{ data: string; }>
--------------------
$3
`typescript
decryptWithPassphrase(options: { passphrase: string; content: string; }) => Promise<{ data: string; }>
`| Param | Type |
| ------------- | ----------------------------------------------------- |
|
options | { passphrase: string; content: string; } |Returns: Promise<{ data: string; }>
--------------------
$3
`typescript
cancelAllRequests(options: unknown) => Promise
`| Param | Type |
| ------------- | -------------------- |
|
options` | unknown |--------------------