当前位置:网站首页>os. Path built-in module

os. Path built-in module

2022-07-04 11:07:00 It's a cinch!

The import module :

 

        import os.path

        from os import path

        import os.path as Alias    

abspath Relative paths —— Returns the absolute path corresponding to the relative path


altsep—— return pthon The separator in
basename—— Return the file name
dirname—— Return to the file directory
isdir—— Judge path( Catalog ) Whether there is
isfile—— Judge whether the file exists
exists—— Determine if a file or directory exists
link—— Judge whether it is a link
ismount—— Determine whether to mount the file
getctime—— Acquisition time ( Creation time )(1970.01.01- today ), Company : second
getmtime—— Get modification time ,(1970.01.01- today ), Company : second
getsize—— Get file size , Company : byte
join—— Splicing path
sep—— Path divider
split—— Split the path
relpath—— Return true path , Absolute path  《==》 abspath 

'__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_abspath_fallback', '_get_bothseps', '_getfinalpathname', '_getfinalpathname_nonstrict', '_getfullpathname', '_getvolumepathname', '_nt_readlink', '_readlink_deep', 'abspath', 'altsep', 'basename', 'commonpath', 'commonprefix', 'curdir', 'defpath', 'devnull', 'dirname', 'exists', 'expanduser', 'expandvars', 'extsep', 'genericpath', 'getatime', 'getctime', 'getmtime', 'getsize', 'isabs', 'isdir', 'isfile', 'islink', 'ismount', 'join', 'lexists', 'normcase', 'normpath', 'os', 'pardir', 'pathsep', 'realpath', 'relpath', 'samefile', 'sameopenfile', 'samestat', 'sep', 'split', 'splitdrive', 'splitext', 'stat', 'supports_unicode_filenames', 'sys'

原网站

版权声明
本文为[It's a cinch!]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202141411462559.html