diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-07-05 11:32:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-05 18:32:51 +0000 |
commit | d4d3a3c54f5e26dec0cc79e273dc488f8a47f2b3 (patch) | |
tree | e6ff88b550211257ea7a7997e221d10fdf22e242 /ext/fs/in_memory_fs.rs | |
parent | 28d2ff7bdc023a3b7aff47503aa03a8dd65fe87f (diff) |
fix(node): Implement `fs.lchown` (and `process.getegid`) (#24418)
Closes https://github.com/denoland/deno/issues/21260.
Part of https://github.com/denoland/deno/issues/18218.
Implements `node:fs.lchown`, and enables the node_compat test for it.
The test uses `process.getegid`, which we didn't have implemented, so I
went ahead and implemented that as well to get the test working.
Diffstat (limited to 'ext/fs/in_memory_fs.rs')
-rw-r--r-- | ext/fs/in_memory_fs.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/fs/in_memory_fs.rs b/ext/fs/in_memory_fs.rs index e2babf40a..027539e84 100644 --- a/ext/fs/in_memory_fs.rs +++ b/ext/fs/in_memory_fs.rs @@ -178,6 +178,24 @@ impl FileSystem for InMemoryFs { self.chown_sync(&path, uid, gid) } + fn lchown_sync( + &self, + _path: &Path, + _uid: Option<u32>, + _gid: Option<u32>, + ) -> FsResult<()> { + Err(FsError::NotSupported) + } + + async fn lchown_async( + &self, + path: PathBuf, + uid: Option<u32>, + gid: Option<u32>, + ) -> FsResult<()> { + self.lchown_sync(&path, uid, gid) + } + fn remove_sync(&self, _path: &Path, _recursive: bool) -> FsResult<()> { Err(FsError::NotSupported) } |