(mountInfo: MountListItem)
| 107 | } |
| 108 | |
| 109 | async function mountStorage(mountInfo: MountListItem) { |
| 110 | if ( |
| 111 | !rcloneInfo.version.os.toLowerCase().includes('windows') && |
| 112 | !(await fs_exist_dir(mountInfo.mountPath)) |
| 113 | ) { |
| 114 | await fs_make_dir(mountInfo.mountPath) |
| 115 | } |
| 116 | |
| 117 | const back = await rclone_api_post('/mount/mount', { |
| 118 | fs: convertStoragePath(mountInfo.storageName) || mountInfo.storageName, |
| 119 | mountPoint: mountInfo.mountPath, |
| 120 | ...mountInfo.parameters, |
| 121 | }) |
| 122 | |
| 123 | await reupMount() |
| 124 | return back |
| 125 | } |
| 126 | |
| 127 | async function unmountStorage(mountPath: string) { |
| 128 | await rclone_api_post('/mount/unmount', { |
no test coverage detected