doFolder


NamedoFolder JSON
Version 1.2.3 PyPI version JSON
download
home_pagehttps://kuankuan2007.gitee.io/docs/do-folder/
SummaryManage files more easily
upload_time2024-01-16 01:20:31
maintainer
docs_urlNone
authorkuankuan
requires_python
licenseMulan PSL v2
keywords file foler path filesystem
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 文件夹管理(doFolder)

```bash
pip install doFolder
```

## 使用方法

### 导入

```python
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`

### 命令行使用

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

具体作用参见

```bash
compare -h
```

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

## 关于作者

作者主页[宽宽2007](https://kuankuan2007.gitee.io "作者主页")

本项目在[苟浩铭/文件夹管理 (gitee.com)](https://gitee.com/kuankuan2007/do-folder)上开源

帮助文档参见[宽宽的帮助文档 (gitee.io)](https://kuankuan2007.gitee.io/docs/do-folder/)

pypi官网项目地址[Pypi](https://pypi.org/project/doFolder/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://kuankuan2007.gitee.io/docs/do-folder/",
    "name": "doFolder",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "file,foler,path,filesystem",
    "author": "kuankuan",
    "author_email": "2163826131@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/a1/18/9dfef13d63d4f748ebf79f0b0c33d4a4de3fb57c761b7d3d48b3365e8269/doFolder-1.2.3.tar.gz",
    "platform": "windows",
    "description": "# \u6587\u4ef6\u5939\u7ba1\u7406(doFolder)\r\n\r\n```bash\r\npip install doFolder\r\n```\r\n\r\n## \u4f7f\u7528\u65b9\u6cd5\r\n\r\n### \u5bfc\u5165\r\n\r\n```python\r\nimport doFolder\r\n```\r\n\r\n### \u90e8\u5206\u529f\u80fd\r\n\r\n+ `Folder` \u6307\u4e00\u4e2a\u6587\u4ef6\u5939\r\n\r\n  + _\u53c2\u6570_ `path` \u6587\u4ef6\u5939\u8def\u5f84:`str|doFolder.Path`\r\n  + _\u53c2\u6570_ `onlisten` \u662f\u5426\u76d1\u542c\u6bd4\u540c\u6b65\u6587\u4ef6\u5939\u53d8\u52a8:`bool`\r\n  + _\u53c2\u6570_ `scan` \u662f\u5426\u5728\u73b0\u5728\u626b\u63cf(\u5426\u5219\u4f1a\u5728\u8bbf\u95ee\u65f6\u8fdb\u884c\u626b\u63cf)\r\n  + _\u5c5e\u6027_ `files` \u6587\u4ef6\u5939\u4e2d\u7684\u6587\u4ef6\u5217\u8868:`FileList`\r\n  + _\u5c5e\u6027_ `subfolder` \u6587\u4ef6\u5939\u4e2d\u7684\u5b50\u6587\u4ef6\u5939:`FolderList`\r\n  + _\u65b9\u6cd5_ `hasFolder,hasFile` \u662f\u5426\u5305\u62ec\u67d0\u4e2a\u6587\u4ef6/\u6587\u4ef6\u5939,\u53c2\u6570\u4e3a `str`\u65f6\u9ed8\u8ba4\u5339\u914d `.name`\u5c5e\u6027\r\n  + _\u65b9\u6cd5_ `remove,copy,move` \u6587\u4ef6\u5939\u64cd\u4f5c\r\n  + _\u65b9\u6cd5_ `search` \u641c\u7d22\u6587\u4ef6\u5939\u7684\u5185\u5bb9\r\n    + _\u53c2\u6570_ `condition` \u641c\u7d22\u6761\u4ef6:`List[UnformattedMatching]`\r\n    + _\u53c2\u6570_ `aim` \u76ee\u6807: `\"file\"|\"folder\"|\"both\"`\r\n    + _\u53c2\u6570_ `threaded` \u662f\u5426\u7ebf\u7a0b\u5316 `bool`\r\n    + _\u53c2\u6570_ `threaded` \u6700\u5927\u7ebf\u7a0b\u6570:`int`\r\n    + _\u8fd4\u56de_ \u641c\u7d22\u7ed3\u679c:`SearchResult`\r\n  + _\u65b9\u6cd5_ `createFile` \u521b\u5efa\u6587\u4ef6\r\n    + _\u53c2\u6570_ `name` \u6587\u4ef6\u540d\r\n    + _\\[\u53c2\u6570\\]_ `content` \u6587\u4ef6\u5185\u5bb9\r\n+ `File` \u6307\u4e00\u4e2a\u6587\u4ef6\r\n\r\n  + _\u53c2\u6570_ `path` \u6587\u4ef6\u8def\u5f84:`str|doFolder.Path`\r\n  + _\u65b9\u6cd5_ `remove,copy,move` \u6587\u4ef6\u64cd\u4f5c\r\n  + _\u5c5e\u6027_ `mode,ino,dev,uid,gid...` \u53c2\u89c1 `os.stat`\r\n+ `Path` \u6307\u4e00\u4e2a\u8def\u5f84:\u6765\u81easpecialStr\u7684\u8def\u5f84 ``(0.0.10\u4e4b\u540e)``\r\n+ `compare`\u63d0\u4f9b\u6bd4\u8f83\u6587\u4ef6\u5939\u7684API\r\n\r\n  + _\u51fd\u6570_ `compare` \u6bd4\u8f83\u4e24\u4e2a\u6587\u4ef6\u5939\r\n\r\n    + _\u53c2\u6570_ `folder1&folder2` _\u6bd4\u8f83\u7684\u6587\u4ef6\u5939:`Folder`_\r\n    + _\u53c2\u6570_ `compareContent` \u6587\u4ef6\u5185\u5bb9\u7684\u6bd4\u8f83\u65b9\u6cd5:`str|Callable[[doFolder.File,doFolder.File],bool]`\r\n    + _\u53c2\u6570_ `threaded` \u662f\u5426\u7ebf\u7a0b\u5316 `bool`\r\n    + _\u53c2\u6570_ `threaded` \u6700\u5927\u7ebf\u7a0b\u6570:`int`\r\n    + *\u8fd4\u56de* \u6bd4\u8f83\u7ed3\u679c:`CompareResult`\r\n\r\n### \u547d\u4ee4\u884c\u4f7f\u7528\r\n\r\n```bash\r\ncompare Folder1 Folder2 [-c ] [-t [-n num]]\r\n```\r\n\r\n\u5177\u4f53\u4f5c\u7528\u53c2\u89c1\r\n\r\n```bash\r\ncompare -h\r\n```\r\n\r\n\u5bf9\u4e8e\u6bd4\u8f83\u7ed3\u679c\u7684\u64cd\u4f5c\u6307\u4ee4\u8bf7\u5728\u51fa\u73b0 `>>>`\u540e\u952e\u5165 `help`\u5e76\u56de\u8f66\u4ee5\u83b7\u53d6\u8be6\u7ec6\u89e3\u91ca\r\n\r\n## \u5173\u4e8e\u4f5c\u8005\r\n\r\n\u4f5c\u8005\u4e3b\u9875[\u5bbd\u5bbd2007](https://kuankuan2007.gitee.io \"\u4f5c\u8005\u4e3b\u9875\")\r\n\r\n\u672c\u9879\u76ee\u5728[\u82df\u6d69\u94ed/\u6587\u4ef6\u5939\u7ba1\u7406 (gitee.com)](https://gitee.com/kuankuan2007/do-folder)\u4e0a\u5f00\u6e90\r\n\r\n\u5e2e\u52a9\u6587\u6863\u53c2\u89c1[\u5bbd\u5bbd\u7684\u5e2e\u52a9\u6587\u6863 (gitee.io)](https://kuankuan2007.gitee.io/docs/do-folder/)\r\n\r\npypi\u5b98\u7f51\u9879\u76ee\u5730\u5740[Pypi](https://pypi.org/project/doFolder/)\r\n",
    "bugtrack_url": null,
    "license": "Mulan PSL v2",
    "summary": "Manage files more easily",
    "version": "1.2.3",
    "project_urls": {
        "Homepage": "https://kuankuan2007.gitee.io/docs/do-folder/"
    },
    "split_keywords": [
        "file",
        "foler",
        "path",
        "filesystem"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "93841c8fea7cee6bcf259b3280c23057a1cfc13f73bd3762e609a2680a1d85d6",
                "md5": "89988c7df98e28539b011bc8fdd636ed",
                "sha256": "30f3b728778a6602ea32de9ebf09be92d5814d03c3ddeddad81e56760fd541a3"
            },
            "downloads": -1,
            "filename": "doFolder-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "89988c7df98e28539b011bc8fdd636ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18390,
            "upload_time": "2024-01-16T01:20:29",
            "upload_time_iso_8601": "2024-01-16T01:20:29.362766Z",
            "url": "https://files.pythonhosted.org/packages/93/84/1c8fea7cee6bcf259b3280c23057a1cfc13f73bd3762e609a2680a1d85d6/doFolder-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1189dfef13d63d4f748ebf79f0b0c33d4a4de3fb57c761b7d3d48b3365e8269",
                "md5": "c104e0a33059175a7e78d6ca6db66f8b",
                "sha256": "0c5caf6bdd11b5ee746e6002362ba7dcc9ad47720f9993a2a3f0215946053b13"
            },
            "downloads": -1,
            "filename": "doFolder-1.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c104e0a33059175a7e78d6ca6db66f8b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18550,
            "upload_time": "2024-01-16T01:20:31",
            "upload_time_iso_8601": "2024-01-16T01:20:31.300959Z",
            "url": "https://files.pythonhosted.org/packages/a1/18/9dfef13d63d4f748ebf79f0b0c33d4a4de3fb57c761b7d3d48b3365e8269/doFolder-1.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-16 01:20:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "dofolder"
}
        
Elapsed time: 0.24143s