summaryrefslogtreecommitdiff
path: root/cli/standalone/file_system.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/standalone/file_system.rs')
-rw-r--r--cli/standalone/file_system.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/standalone/file_system.rs b/cli/standalone/file_system.rs
index 69e95a97f..f1ea570b5 100644
--- a/cli/standalone/file_system.rs
+++ b/cli/standalone/file_system.rs
@@ -175,6 +175,17 @@ impl FileSystem for DenoCompileFileSystem {
}
}
+ fn cp_sync(&self, from: &Path, to: &Path) -> FsResult<()> {
+ self.error_if_in_vfs(to)?;
+
+ RealFs.cp_sync(from, to)
+ }
+ async fn cp_async(&self, from: PathBuf, to: PathBuf) -> FsResult<()> {
+ self.error_if_in_vfs(&to)?;
+
+ RealFs.cp_async(from, to).await
+ }
+
fn stat_sync(&self, path: &Path) -> FsResult<FsStat> {
if self.0.is_path_within(path) {
Ok(self.0.stat(path)?)