diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-11-16 20:48:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-16 20:48:50 +0100 |
commit | 636af2850c90f6bf7005a270d95b68bc9718de75 (patch) | |
tree | 9ebffa025237f1ef42226e3168780beac2768b95 /cli/http_cache.rs | |
parent | 8ab20a4582016542ac3d8140593f817ab920005f (diff) |
refactor(cli): rename fs module to fs_util (#8380)
This commit renames "fs" module in "cli/" to "fs_util". This is purely
cosmetic change; there were a few places which aliased "crate::fs"
to "deno_fs" which was very confusing with "fs" module in ops.
Diffstat (limited to 'cli/http_cache.rs')
-rw-r--r-- | cli/http_cache.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/http_cache.rs b/cli/http_cache.rs index 7310c9e92..9cf2adc1a 100644 --- a/cli/http_cache.rs +++ b/cli/http_cache.rs @@ -4,7 +4,7 @@ /// as defined in RFC 7234 (https://tools.ietf.org/html/rfc7234). /// Currently it's a very simplified version to fulfill Deno needs /// at hand. -use crate::fs as deno_fs; +use crate::fs_util; use crate::http_util::HeadersMap; use deno_core::error::AnyError; use deno_core::serde_json; @@ -87,7 +87,7 @@ impl Metadata { pub fn write(&self, cache_filename: &Path) -> Result<(), AnyError> { let metadata_filename = Self::filename(cache_filename); let json = serde_json::to_string_pretty(self)?; - deno_fs::write_file(&metadata_filename, json, CACHE_PERM)?; + fs_util::write_file(&metadata_filename, json, CACHE_PERM)?; Ok(()) } @@ -161,7 +161,7 @@ impl HttpCache { .expect("Cache filename should have a parent dir"); self.ensure_dir_exists(parent_filename)?; // Cache content - deno_fs::write_file(&cache_filename, content, CACHE_PERM)?; + fs_util::write_file(&cache_filename, content, CACHE_PERM)?; let metadata = Metadata { url: url.to_string(), |