diff options
Diffstat (limited to 'ext/fs')
-rw-r--r-- | ext/fs/interface.rs | 1 | ||||
-rw-r--r-- | ext/fs/std_fs.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ext/fs/interface.rs b/ext/fs/interface.rs index 5031dc134..833f362bf 100644 --- a/ext/fs/interface.rs +++ b/ext/fs/interface.rs @@ -72,6 +72,7 @@ pub enum FsFileType { #[derive(Serialize)] #[serde(rename_all = "camelCase")] pub struct FsDirEntry { + pub parent_path: String, pub name: String, pub is_file: bool, pub is_directory: bool, diff --git a/ext/fs/std_fs.rs b/ext/fs/std_fs.rs index 9e2acedcc..054f5c9c4 100644 --- a/ext/fs/std_fs.rs +++ b/ext/fs/std_fs.rs @@ -785,6 +785,7 @@ fn read_dir(path: &Path) -> FsResult<Vec<FsDirEntry>> { }; } Some(FsDirEntry { + parent_path: path.to_string_lossy().to_string(), name, is_file: method_or_false!(is_file), is_directory: method_or_false!(is_dir), |