add create file for sync
This commit is contained in:
@@ -47,6 +47,12 @@ export class SyncBase {
|
||||
return {} as Config;
|
||||
}
|
||||
}
|
||||
getRelativeFile(filename?: string) {
|
||||
if (!filename) return false;
|
||||
const dir = this.#dir;
|
||||
const file = path.join(dir, filename);
|
||||
return { relative: path.relative(dir, file), absolute: file };
|
||||
}
|
||||
async canDone(syncType: SyncConfigType, type?: SyncConfigType) {
|
||||
if (syncType === 'sync') return true;
|
||||
return syncType === type;
|
||||
|
||||
Reference in New Issue
Block a user