Skip to content

clouds56/projfs-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProjFS

Chrono on crates.io Chrono on docs.rs

See example for more information

Get Start

One should create a struct MyProjFS that implements Sync, ProjFSDirEnum and ProjFSRead in order to get a instance.

// create root dir to be projected
std::fs::create_dir("root_dir").ok();
// create a virtualization instance of MyProjFS
// this function returned immediately, and you would like to hold the instance during the projection
let instance = start_proj_virtualization("root_dir", Box::new(MyProjFS::new())).unwrap();
std::thread::sleep(std::time::Duration::from_secs(std::u64::MAX));
// once the instance dropped, the projection stopped
drop(instance)

Features

See also mircosoft guide here Now we could provide callback functions

  • PRJ_CANCEL_COMMAND_CB
  • PRJ_END_DIRECTORY_ENUMERATION_CB
  • PRJ_GET_DIRECTORY_ENUMERATION_CB
  • PRJ_GET_FILE_DATA_CB (via ProjFSRead::read)
  • PRJ_GET_PLACEHOLDER_INFO_CB (via ProjFSRead::get_metadata)
  • PRJ_NOTIFICATION_CB
  • PRJ_QUERY_FILE_NAME_CB
  • PRJ_START_DIRECTORY_ENUMERATION_CB

Callback series PRJ_*_DIRECTORY_ENUMERATION_CB would be generate by ProjFSDirEnum::dir_iter and ProjFSDirEnum::dir_iter_cache.

Note

Make sure Projected File System is enabled on your machine

Enable-WindowsOptionalFeature -Online -FeatureName Client-ProjFS -NoRestart

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published