File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -605,6 +605,17 @@ fn os_stat(path: PyStringRef, vm: &VirtualMachine) -> PyResult {
605605 unimplemented ! ( ) ;
606606}
607607
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+
608619#[ cfg( unix) ]
609620fn os_symlink (
610621 src : PyStringRef ,
@@ -788,6 +799,7 @@ pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
788799 "ScandirIter" => scandir_iter,
789800 "DirEntry" => dir_entry,
790801 "stat_result" => stat_result,
802+ "lstat" => ctx. new_rustfunc( os_lstat) ,
791803 "getcwd" => ctx. new_rustfunc( os_getcwd) ,
792804 "chdir" => ctx. new_rustfunc( os_chdir) ,
793805 "fspath" => ctx. new_rustfunc( os_fspath) ,
You can’t perform that action at this time.
0 commit comments