mirror of
https://github.com/denoland/deno.git
synced 2025-08-31 15:57:53 +00:00
chore: rename some helpers on the Fs trait (#20097)
Rename some of the helper methods on the Fs trait to be suffixed with `_sync` / `_async`, in preparation of the introduction of more async methods for some helpers. Also adds a `read_text_file_async` helper to complement the renamed `read_text_file_sync` helper.
This commit is contained in:
parent
f2e30a6f79
commit
03e963f578
9 changed files with 40 additions and 32 deletions
|
@ -745,7 +745,7 @@ impl NpmModuleLoader {
|
|||
let file_path = specifier.to_file_path().unwrap();
|
||||
let code = self
|
||||
.fs
|
||||
.read_to_string(&file_path)
|
||||
.read_text_file_sync(&file_path)
|
||||
.map_err(AnyError::from)
|
||||
.with_context(|| {
|
||||
if file_path.is_dir() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue