Skip to main content

liwancai-DirsFile

文件和目录操作工具包

安装

pip install liwancai-DirsFile

使用方法

from DirsFile import Save_Toml, Read_Toml, Mkdir

# 或者导入所有功能
from DirsFile import *

功能列表

基础文件操作

  • GetthisPyPath() - 获取当前脚本路径
  • SplitDiv() - 分离盘符与路径
  • SplitDir() - 文件路径和文件分离
  • DirName() - 取路径中文件夹路径
  • FileName() - 取路径中文件
  • FileEND() - 分离后缀名
  • Mkdir() - 创建文件夹
  • FileSize() - 获取文件尺寸
  • MoveTO() - 移动文件
  • CopyTo() - 复制文件
  • ReName() - 文件重命名
  • Del_P() - 删除文件夹
  • Del_F() - 删除文件

目录操作

  • Pathsdirs() - 路径下文件夹
  • Pathsname() - 路径下文件夹名称
  • Del_NanP() - 删除空文件夹
  • Scan_File() - 查找目录下所有文件
  • EndWithPath() - 获取指定后缀名的文件路径

文件读写

  • SavePickle() - 保存状态
  • LoadPickle() - 加载状态
  • WriteFile() - 写入文件
  • ReadFile() - 读取文件
  • ReadLine() - 按行读取文件
  • Save_Json() - 保存json文件
  • Read_Json() - 读取json文件
  • Read_Csv() - 读取csv文件
  • Read_Xls() - 读取xls文件
  • Save_Csv() - 保存csv文件
  • TodoCsv - CSV文件操作类

哈希计算

  • File_Hash_MD5() - 文件MD5哈希
  • File_Hash_SHA_256() - 文件SHA-256哈希
  • Str_Hash_MD5() - 字符串MD5哈希
  • Str_Hash_SHA_256() - 字符串SHA-256哈希

图像处理

  • ImgToBase64() - 图片转base64
  • Base64_img() - base64编码
  • Base64ImgSave() - base64转图片

网络传输

  • FTP_Link() - FTP连接
  • FTP_DWload() - FTP下载
  • FTP_UPload() - FTP上传

压缩解压

  • un_zip() - 解压zip文件
  • un_gz() - 解压gz文件
  • un_tar() - 解压tar文件
  • In_tar() - 压缩tar.gz文件
  • In_zip() - 压缩zip文件

配置管理

  • Save_Toml() - 保存Toml配置文件
  • Read_Toml() - 读取Toml配置文件

系统命令

  • Run_Cmd() - 执行cmd命令

目录树

  • DirectionTree - 目录树生成类
  • Path_Tree() - 文件目录树

依赖

  • liwancai-PyLog
  • toml

可选依赖

  • pandas (用于CSV/Excel操作)
  • Pillow (用于图像处理)

许可证

MIT License

作者

liwancai (QQ: 248411282)

Metadata

Release files for liwancai-DirsFile 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for liwancai-DirsFile 1.0.5
File Size Uploaded Provenance Actions
liwancai_dirsfile-1.0.5.tar.gz 9.7 kB Without provenance Details for liwancai_dirsfile-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for liwancai-DirsFile 1.0.5
File Interpreter ABI Platform Actions
liwancai_dirsfile-1.0.5-py3-none-any.whl Python 3 none any Details for liwancai_dirsfile-1.0.5-py3-none-any.whl

Total release size: 19.7 kB

Release files / liwancai_dirsfile-1.0.5.tar.gz

Download URL liwancai_dirsfile-1.0.5.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0a400e2e6bdf35dbd503489062698c0f8755b7d957e14105c15de3acacad417b
BLAKE2b-256 checksum
How to use checksums
1b65758e01c72daaae990a1857c6197f67146a44da131a4f81d20c5e43d76e16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / liwancai_dirsfile-1.0.5-py3-none-any.whl

Download URL liwancai_dirsfile-1.0.5-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b281ff17602413ca3e554706fa3a2f879a6d02cce3281098b2a335ddb7180701
BLAKE2b-256 checksum
How to use checksums
2d86603156c45bfa0b27883873ca98c819b6c8da9a10d1b585e203280c74ffa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for liwancai-DirsFile 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page