We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c060086 + 87d866d commit d185f53Copy full SHA for d185f53
1 file changed
vm/src/stdlib/os.rs
@@ -605,6 +605,17 @@ fn os_stat(path: PyStringRef, vm: &VirtualMachine) -> PyResult {
605
unimplemented!();
606
}
607
608
+fn os_lstat(path: PyStringRef, dir_fd: DirFd, vm: &VirtualMachine) -> PyResult<StatResult> {
609
+ os_stat(
610
+ path,
611
+ dir_fd,
612
+ FollowSymlinks {
613
+ follow_symlinks: false,
614
+ },
615
+ vm,
616
+ )
617
+}
618
+
619
#[cfg(unix)]
620
fn os_symlink(
621
src: PyStringRef,
@@ -788,6 +799,7 @@ pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
788
799
"ScandirIter" => scandir_iter,
789
800
"DirEntry" => dir_entry,
790
801
"stat_result" => stat_result,
802
+ "lstat" => ctx.new_rustfunc(os_lstat),
791
803
"getcwd" => ctx.new_rustfunc(os_getcwd),
792
804
"chdir" => ctx.new_rustfunc(os_chdir),
793
805
"fspath" => ctx.new_rustfunc(os_fspath),
0 commit comments