LensStudio:FileSystem.CopyDirOptions
ClassUsed with "LensStudio:FileSystem".CopyDirOptions.
Index
Example
const fs = await import('LensStudio:FileSystem');
// Use TempDir for safe scratch paths
const tmp = fs.TempDir.create();
const src = new Editor.Path(tmp.path.toString()).appended(new Editor.Path('source'));
const dst = new Editor.Path(tmp.path.toString()).appended(new Editor.Path('destination'));
fs.createDir(src, { recursive: true } as any);
fs.createDir(dst, { recursive: true } as any);
// CopyDirOptions: force (overwrite existing), recursive (include subdirs)
fs.copyDir(src, dst, { force: true, recursive: true } as any);
console.log('Copied directory with force + recursive options');
Properties
force
force:
boolean
When true, overwrites existing files at the destination.
recursive
recursive:
boolean
When true, copies nested subdirectories and their contents.