In Unix, a file is removable if you have write access to the parent directory.
So you can write something like:
fn removable(path: AsRef<Path>) -> Result<bool> {
match path.as_ref().parent() {
Some(parent) => parent.writable(),
None => Ok(false),
}
}
Not sure about Windows tho, what do you think?