context: add ContextDriver::is_dir
list_files returns context-relative paths (rooted inside the chroot for an unshare context, on the remote for ssh): whether an entry is a directory can only be decided through the context, never with a host-side stat. Give every driver a proper is_dir rather than approximating it with exists, so callers can keep directories and files apart — the deb package-directory search lists directories only.
This commit is contained in:
1 parent
cc5bbd2297
commit
681fa3d687
7 files changed
+80
No files matched your search
@@ -445,6 +445,10 @@ mod imp {
|
||||
self.inner.exists(path)
|
||||
}
|
||||
|
||||
fn is_dir(&self, path: &Path) -> io::Result<bool> {
|
||||
self.inner.is_dir(path)
|
||||
}
|
||||
|
||||
fn cleanup(&self) -> io::Result<()> {
|
||||
self.inner.cleanup()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user