Skip to main content

Manage files more easily

Project description

文件夹管理(doFolder)

pip install doFolder

使用方法

导入

import doFolder

部分功能

  • Folder 指一个文件夹

    • 参数 path 文件夹路径:str|doFolder.Path
    • 参数 onlisten 是否监听比同步文件夹变动:bool
    • 参数 scan 是否在现在扫描(否则会在访问时进行扫描)
    • 属性 files 文件夹中的文件列表:FileList
    • 属性 subfolder 文件夹中的子文件夹:FolderList
    • 方法 hasFolder,hasFile 是否包括某个文件/文件夹,参数为 str时默认匹配 .name属性
    • 方法 remove,copy,move 文件夹操作
    • 方法 search 搜索文件夹的内容
      • 参数 condition 搜索条件:List[UnformattedMatching]
      • 参数 aim 目标: "file"|"folder"|"both"
      • 参数 threaded 是否线程化 bool
      • 参数 threaded 最大线程数:int
      • 返回 搜索结果:SearchResult
    • 方法 createFile 创建文件
      • 参数 name 文件名
      • [参数] content 文件内容
  • File 指一个文件

    • 参数 path 文件路径:str|doFolder.Path
    • 方法 remove,copy,move 文件操作
    • 属性 mode,ino,dev,uid,gid... 参见 os.stat
  • Path 指一个路径:来自specialStr的路径 (0.0.10之后)

  • compare提供比较文件夹的API

    • 函数 compare 比较两个文件夹

      • 参数 folder1&folder2 比较的文件夹:Folder
      • 参数 compareContent 文件内容的比较方法:str|Callable[[doFolder.File,doFolder.File],bool]
      • 参数 threaded 是否线程化 bool
      • 参数 threaded 最大线程数:int
      • 返回 比较结果:CompareResult

命令行使用

compare Folder1 Folder2 [-c ] [-t [-n num]]

具体作用参见

compare -h

对于比较结果的操作指令请在出现 >>>后键入 help并回车以获取详细解释

关于作者

作者主页宽宽2007

本项目在苟浩铭/文件夹管理 (gitee.com)上开源

帮助文档参见宽宽的帮助文档 (gitee.io)

pypi官网项目地址Pypi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doFolder-1.2.3.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

doFolder-1.2.3-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file doFolder-1.2.3.tar.gz.

File metadata

  • Download URL: doFolder-1.2.3.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for doFolder-1.2.3.tar.gz
Algorithm Hash digest
SHA256 0c5caf6bdd11b5ee746e6002362ba7dcc9ad47720f9993a2a3f0215946053b13
MD5 c104e0a33059175a7e78d6ca6db66f8b
BLAKE2b-256 a1189dfef13d63d4f748ebf79f0b0c33d4a4de3fb57c761b7d3d48b3365e8269

See more details on using hashes here.

File details

Details for the file doFolder-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: doFolder-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for doFolder-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 30f3b728778a6602ea32de9ebf09be92d5814d03c3ddeddad81e56760fd541a3
MD5 89988c7df98e28539b011bc8fdd636ed
BLAKE2b-256 93841c8fea7cee6bcf259b3280c23057a1cfc13f73bd3762e609a2680a1d85d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page