Skip to content

Commit

Permalink
feat: add memory fs
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrykingxyz committed Nov 7, 2024
1 parent b3ffc46 commit d08c97b
Show file tree
Hide file tree
Showing 4 changed files with 523 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/rspack_fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ dunce = { version = "1.0.5" }
futures = { workspace = true }
rspack_error = { path = "../rspack_error", version = "0.1.0" }
rspack_paths = { path = "../rspack_paths", version = "0.1.0" }
tokio = { workspace = true, features = ["fs"] }
tokio = { workspace = true, features = ["fs", "test-util", "macros"] }
2 changes: 1 addition & 1 deletion crates/rspack_fs/src/file_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fs::Metadata;

use crate::{Error, Result};

#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct FileMetadata {
pub is_file: bool,
pub is_directory: bool,
Expand Down
3 changes: 3 additions & 0 deletions crates/rspack_fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ mod macros;
mod native_fs;
pub use native_fs::NativeFileSystem;

mod memory_fs;
pub use memory_fs::MemoryFileSystem;

mod error;
pub use error::{Error, Result};
Loading

0 comments on commit d08c97b

Please sign in to comment.