3 releases
0.1.2 | Oct 3, 2020 |
---|---|
0.1.1 | Aug 17, 2020 |
0.1.0 | Aug 12, 2020 |
#1601 in Filesystem
Used in projfs
87KB
1.5K
SLoC
Contains (static library, 11KB) lib/x86/ProjectedFSLib.lib, (static library, 10KB) lib/arm/ProjectedFSLib.lib, (static library, 10KB) lib/arm64/ProjectedFSLib.lib, (static library, 10KB) lib/x64/ProjectedFSLib.lib
ProjFS
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
(viaProjFSRead::read
) -
PRJ_GET_PLACEHOLDER_INFO_CB
(viaProjFSRead::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
No runtime deps
~130KB