summaryrefslogtreecommitdiff
path: root/cli/cache/disk_cache.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-11-28 17:28:54 -0500
committerGitHub <noreply@github.com>2022-11-28 17:28:54 -0500
commit2d4c46c975eb916dc622cc729a1a8d397582a76f (patch)
tree445e819117acd2f94ffc9d7da7ed8e3e604435d0 /cli/cache/disk_cache.rs
parentf526513d74d34ac254aa40ef9b73238cb21c395b (diff)
refactor: create util folder, move nap_sym to napi/sym, move http_cache to cache folder (#16857)
Diffstat (limited to 'cli/cache/disk_cache.rs')
-rw-r--r--cli/cache/disk_cache.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/cli/cache/disk_cache.rs b/cli/cache/disk_cache.rs
index 81379ac94..60e353d85 100644
--- a/cli/cache/disk_cache.rs
+++ b/cli/cache/disk_cache.rs
@@ -1,7 +1,8 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
-use crate::fs_util;
-use crate::http_cache::url_to_filename;
+use super::http_cache::url_to_filename;
+use super::CACHE_PERM;
+use crate::util::fs::atomic_write_file;
use deno_core::url::Host;
use deno_core::url::Url;
@@ -144,7 +145,7 @@ impl DiskCache {
Some(parent) => self.ensure_dir_exists(parent),
None => Ok(()),
}?;
- fs_util::atomic_write_file(&path, data, crate::http_cache::CACHE_PERM)
+ atomic_write_file(&path, data, CACHE_PERM)
.map_err(|e| with_io_context(&e, format!("{:#?}", &path)))
}
}