美文网首页
【Python】os.path

【Python】os.path

作者: 盐果儿 | 来源:发表于2023-04-15 19:02 被阅读0次

os.path is a module in Python's standard library that provides functions for working with file paths and directory paths in a platform-independent way.

os.path.join(): joins two or more path components intelligently, taking into account the operating system's path separator.

os.path.exists(): returns True if a file or directory path exists and False otherwise.

os.path.abspath(): returns the absolute path of a file or directory.

os.path.dirname(): returns the directory component of a path.

相关文章

网友评论

      本文标题:【Python】os.path

      本文链接:https://www.haomeiwen.com/subject/bqbxjdtx.html