Skip to content

Commit

Permalink
native: Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Dec 15, 2024
1 parent 7e3e6ec commit fcf019c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions native/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,7 @@ fn resolve(wd: &str, specifier: &str, containing_filename: Option<String>) -> Re
Ok(ret?.path().to_str().unwrap().to_owned())
}

pub fn dir_exists(path: &str) -> io::Result<bool> {
match fs::metadata(path) {
Ok(meta) => Ok(meta.is_dir() || meta.is_symlink()),
Err(error) if error.kind() == io::ErrorKind::NotFound => Ok(false),
Err(error) => Err(error),
}
}

pub fn file_exists(path: &str) -> io::Result<bool> {
fn file_exists(path: &str) -> io::Result<bool> {
match fs::metadata(path) {
Ok(meta) => Ok(meta.is_file()),
Err(error) if error.kind() == io::ErrorKind::NotFound => Ok(false),
Expand Down

0 comments on commit fcf019c

Please sign in to comment.