Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Nov 17, 2024
1 parent 9a9a763 commit 8015cd2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ mount.run().expect("Failed to run filesystem event loop");

## CLI Tool

remotefs-fuse comes with a CLI tool **remotefs-fuse-cli** to mount remote file systems with FUSE.
remotefs-fuse comes with a CLI tool **remotefs-fuse-cli** to mount remote file systems with FUSE or Dokany.

```sh
cargo install remotefs-fuse-cli
Expand Down
11 changes: 10 additions & 1 deletion remotefs-fuse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
//! remotefs_fuse::MountOption::FSName(volume),
//! ];
//!
//! let remote = todo!();
//! let remote = MyRemoteFileSystem::new();
//! let mount_path = std::path::PathBuf::from("/mnt/remote");
//! let mut mount = Mount::mount(remote, &mount_path, &options).expect("Failed to mount");
//! let mut umount = mount.unmounter();
Expand All @@ -79,8 +79,17 @@
//! })?;
//!
//! mount.run().expect("Failed to run filesystem event loop");
//!
//! ```
//!
//! > To mount on a Windows system **specify a drive letter** (e.g. `Z`) instead of a path.
//!
//! ## Project stability
//!
//! Please consider this is an early-stage project and I haven't heavily tested it, in particular on Windows systems.
//!
//! I suggest you to first test it on test filesystems to see whether the library behaves correctly with your system.
//!
#![doc(html_playground_url = "https://play.rust-lang.org")]
#![doc(
Expand Down
3 changes: 2 additions & 1 deletion remotefs-fuse/tests/driver/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::path::{Path, PathBuf};

use path_slash::PathBufExt;
use remotefs::fs::{Metadata, UnixPex};
use remotefs::{RemoteError, RemoteErrorType, RemoteFs};
use remotefs_memory::{node, Inode, MemoryFs, Node, Tree};
Expand Down Expand Up @@ -68,6 +67,8 @@ fn make_file_at(remote: &mut MemoryFs, path: &Path, content: &[u8]) {
///
/// All the stems in the path will be created if they do not exist.
fn make_dir_at(remote: &mut MemoryFs, path: &Path) {
use path_slash::PathBufExt;

let mut abs_path = Path::new("/").to_path_buf();
for stem in path.iter() {
abs_path.push(stem);
Expand Down

0 comments on commit 8015cd2

Please sign in to comment.