mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user