乌尔斯塔利布
urlpathlib的Python项目详细描述
此模块提供了表示路径的类,这些类的语义适合于 本地和远程资源。
安装
只需运行以下命令:
pip install urlpathlib
功能
支持的协议:
protocol | scheme | support |
---|---|---|
local filesystem | file:// | ✓ |
HTTP | http:// | ✓ |
支持的IO操作:
method name | file:// | http[s]:// |
---|---|---|
chmod | ✓ | |
exists | ✓ | ✓ |
expanduser | ✓ | |
glob | ✓ | |
group | ✓ | |
is_block_device | ✓ | |
is_char_device | ✓ | |
is_dir | ✓ | |
is_fifo | ✓ | |
is_file | ✓ | |
is_socket | ✓ | |
is_symlink | ✓ | |
iterdir | ✓ | ✓ |
lchmod | ✓ | |
lstat | ✓ | |
mkdir | ✓ | |
open | ✓ | ✓ ¹ |
read_bytes | ✓ | |
read_text | ✓ | |
rename | ✓ | |
replace | ✓ | |
resolve | ✓ | |
rglob | ✓ | |
rmdir | ✓ | |
samefile | ✓ | |
stat | ✓ | |
symlink_to | ✓ | |
touch | ✓ | |
unlink | ✓ | |
write_bytes | ✓ | |
write_text | ✓ |
注意:
尼亚:目前只支持二进制读取。