Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 0 additions & 114 deletions turbopack/crates/turbo-tasks-fs/src/attach.rs

This file was deleted.

21 changes: 6 additions & 15 deletions turbopack/crates/turbo-tasks-fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#![allow(clippy::needless_return)] // tokio macro-generated code doesn't respect this
#![allow(clippy::mutable_key_type)]

pub mod attach;
pub mod embed;
pub mod glob;
mod globset;
Expand Down Expand Up @@ -76,7 +75,6 @@ use turbo_unix_path::{
};

use crate::{
attach::AttachedFileSystem,
glob::Glob,
invalidation::Write,
invalidator_map::InvalidatorMap,
Expand Down Expand Up @@ -2840,20 +2838,13 @@ impl FileSystem for NullFileSystem {
}
}

pub async fn to_sys_path(mut path: FileSystemPath) -> Result<Option<PathBuf>> {
loop {
if let Some(fs) = ResolvedVc::try_downcast_type::<AttachedFileSystem>(path.fs) {
path = fs.get_inner_fs_path(path).owned().await?;
continue;
}

if let Some(fs) = ResolvedVc::try_downcast_type::<DiskFileSystem>(path.fs) {
let sys_path = fs.await?.to_sys_path(&path);
return Ok(Some(sys_path));
}

return Ok(None);
pub async fn to_sys_path(path: FileSystemPath) -> Result<Option<PathBuf>> {
if let Some(fs) = ResolvedVc::try_downcast_type::<DiskFileSystem>(path.fs) {
let sys_path = fs.await?.to_sys_path(&path);
return Ok(Some(sys_path));
}

Ok(None)
}

#[turbo_tasks::function]
Expand Down
Loading