mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
refactor: create util folder, move nap_sym to napi/sym, move http_cache to cache folder (#16857)
This commit is contained in:
parent
f526513d74
commit
2d4c46c975
57 changed files with 940 additions and 920 deletions
7
cli/cache/disk_cache.rs
vendored
7
cli/cache/disk_cache.rs
vendored
|
@ -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)))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue