Files On Demand is a new OneDrive feature that only downloads files to the local disk when needed.
- Install the latest Windows and OneDrive updates
- Open OneDrive settings, enable Files On Demand
- Run this code with the path to your OneDrive folder:
let metadata = Path::new("C:\\Users\\roblourens\\OneDrive").metadata().expect("failed");
println!("{:?}", metadata.file_type());
println!("{:?}", metadata.is_dir());
println!("{:?}", metadata.is_file());
println!("{:?}", metadata.len());
Output:
FileType(ReparsePoint)
false
false
4096
Here's a PR in libuv that fixed an issue with Files On Demand, in case there's a similar issue in Rust: https://github.com/libuv/libuv/pull/1522/files
Ref: BurntSushi/ripgrep#705 and microsoft/vscode#35433
Files On Demand is a new OneDrive feature that only downloads files to the local disk when needed.
Output:
Here's a PR in libuv that fixed an issue with Files On Demand, in case there's a similar issue in Rust: https://github.com/libuv/libuv/pull/1522/files
Ref: BurntSushi/ripgrep#705 and microsoft/vscode#35433