feat(file-system): allow copy when opening a File (#10274)

* feat: add copy file to file-system

* feat(file-system): allow temp copy of files opened with File.fromPath

* chore: remove log

* chore: remove log

* fix: only copy if true

---------

Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
This commit is contained in:
Osei Fortune
2023-04-25 00:30:28 -04:00
committed by GitHub
parent 4551da075b
commit 18bba2bc11
7 changed files with 104 additions and 34 deletions

View File

@@ -110,7 +110,12 @@ export function pickFile() {
//const file = File.fromPath(args.intent.getData().toString());
//console.log(file);
//readFile(file);
copyFile(file);
//copyFile(file);
console.time('fromPath: copy');
const f = File.fromPath(file, true);
console.timeEnd('fromPath: copy');
console.log('old path: ', file);
console.log('new path: ', f.path, f.extension, f.size);
}
});
const Intent = android.content.Intent;