(key: string)
| 125 | } |
| 126 | |
| 127 | async stat(key: string): Promise<Entity> { |
| 128 | const statRes = await statFix(this.vault, key); |
| 129 | if (statRes === undefined || statRes === null) { |
| 130 | throw Error(`${key} does not exist! cannot stat for local`); |
| 131 | } |
| 132 | const isFolder = statRes.type === "folder"; |
| 133 | return { |
| 134 | key: isFolder ? `${key}/` : key, // local always unencrypted |
| 135 | keyRaw: isFolder ? `${key}/` : key, |
| 136 | ctimeCli: statRes.ctime, |
| 137 | mtimeCli: statRes.mtime, |
| 138 | mtimeSvr: statRes.mtime, |
| 139 | ctimeCliFmt: unixTimeToStr(statRes.ctime), |
| 140 | mtimeCliFmt: unixTimeToStr(statRes.mtime), |
| 141 | mtimeSvrFmt: unixTimeToStr(statRes.mtime), |
| 142 | size: statRes.size, // local always unencrypted |
| 143 | sizeRaw: statRes.size, |
| 144 | }; |
| 145 | } |
| 146 | |
| 147 | async mkdir(key: string, mtime?: number, ctime?: number): Promise<Entity> { |
| 148 | // console.debug(`mkdir: ${key}`); |
no test coverage detected