FileFly


NameFileFly JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
Summary适用于64位Windows的文件查找工具
upload_time2024-05-08 08:39:36
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords file windows find find file
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FileFly

* 一个用Rust开发的文件工具
* 适用于64位Windows
* 简单易用  无其他依赖
* 速度超快  10W+文件全部搜索完成仅需0.6秒

# 示例

```python
from re import compile as Regex
from time import time

import FileFly


def Wrap(Fun):
    def _Wrap(*args, **kwargs):
        Time_Start = time()
        Results = Fun(*args, **kwargs)
        print(f"{Fun.__name__} 耗时 {time() - Time_Start} 秒")
        return Results
    [setattr(_Wrap, E, getattr(Fun, E))
     for E in ["__module__", "__name__", "__doc__",
               "__qualname__", "__annotations__"]]
    return _Wrap


@Wrap
def TestAllFile():
    print(len(FileFly.GetAllFile("D:\\", True)))


@Wrap
def TestPngFile():
    print(len(FileFly.GetAllFile("D:\\", True, Regex(r".*\.png$"), False, False)))


if __name__ == "__main__":
    TestAllFile()
    TestPngFile()

>>> 109193
>>> TestAllFile 耗时 0.5151987075805664 秒
>>> 5346
>>> TestPngFile 耗时 0.6114356517791748 秒
```

# 任务目标

* [X] 获取系统所有硬盘
* [X] 获取硬盘全部文件(HS系统元文件自动跳过)
* [X] 实现原生正则匹配
* [ ] 适配Linux
* [ ] ...

# 现存问题以及解决方案

* 系统盘根目录全部文件耗时较长, 应避免直接读取系统盘根目录, 可对需要的目录进行过滤



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "FileFly",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "WebChang <2965330149@qq.com>",
    "keywords": "File, Windows, Find, Find File",
    "author": null,
    "author_email": "WebChang <2965330149@qq.com>",
    "download_url": null,
    "platform": null,
    "description": "# FileFly\r\n\r\n* \u4e00\u4e2a\u7528Rust\u5f00\u53d1\u7684\u6587\u4ef6\u5de5\u5177\r\n* \u9002\u7528\u4e8e64\u4f4dWindows\r\n* \u7b80\u5355\u6613\u7528  \u65e0\u5176\u4ed6\u4f9d\u8d56\r\n* \u901f\u5ea6\u8d85\u5feb  10W+\u6587\u4ef6\u5168\u90e8\u641c\u7d22\u5b8c\u6210\u4ec5\u97000.6\u79d2\r\n\r\n# \u793a\u4f8b\r\n\r\n```python\r\nfrom re import compile as Regex\r\nfrom time import time\r\n\r\nimport FileFly\r\n\r\n\r\ndef Wrap(Fun):\r\n    def _Wrap(*args, **kwargs):\r\n        Time_Start = time()\r\n        Results = Fun(*args, **kwargs)\r\n        print(f\"{Fun.__name__} \u8017\u65f6 {time() - Time_Start} \u79d2\")\r\n        return Results\r\n    [setattr(_Wrap, E, getattr(Fun, E))\r\n     for E in [\"__module__\", \"__name__\", \"__doc__\",\r\n               \"__qualname__\", \"__annotations__\"]]\r\n    return _Wrap\r\n\r\n\r\n@Wrap\r\ndef TestAllFile():\r\n    print(len(FileFly.GetAllFile(\"D:\\\\\", True)))\r\n\r\n\r\n@Wrap\r\ndef TestPngFile():\r\n    print(len(FileFly.GetAllFile(\"D:\\\\\", True, Regex(r\".*\\.png$\"), False, False)))\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    TestAllFile()\r\n    TestPngFile()\r\n\r\n>>> 109193\r\n>>> TestAllFile \u8017\u65f6 0.5151987075805664 \u79d2\r\n>>> 5346\r\n>>> TestPngFile \u8017\u65f6 0.6114356517791748 \u79d2\r\n```\r\n\r\n# \u4efb\u52a1\u76ee\u6807\r\n\r\n* [X] \u83b7\u53d6\u7cfb\u7edf\u6240\u6709\u786c\u76d8\r\n* [X] \u83b7\u53d6\u786c\u76d8\u5168\u90e8\u6587\u4ef6(HS\u7cfb\u7edf\u5143\u6587\u4ef6\u81ea\u52a8\u8df3\u8fc7)\r\n* [X] \u5b9e\u73b0\u539f\u751f\u6b63\u5219\u5339\u914d\r\n* [ ] \u9002\u914dLinux\r\n* [ ] ...\r\n\r\n# \u73b0\u5b58\u95ee\u9898\u4ee5\u53ca\u89e3\u51b3\u65b9\u6848\r\n\r\n* \u7cfb\u7edf\u76d8\u6839\u76ee\u5f55\u5168\u90e8\u6587\u4ef6\u8017\u65f6\u8f83\u957f, \u5e94\u907f\u514d\u76f4\u63a5\u8bfb\u53d6\u7cfb\u7edf\u76d8\u6839\u76ee\u5f55, \u53ef\u5bf9\u9700\u8981\u7684\u76ee\u5f55\u8fdb\u884c\u8fc7\u6ee4\r\n\r\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "\u9002\u7528\u4e8e64\u4f4dWindows\u7684\u6587\u4ef6\u67e5\u627e\u5de5\u5177",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "file",
        " windows",
        " find",
        " find file"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e836b3a1ad591514ba16c72b682f26bdb11af1477d01ce9c3916f39486635365",
                "md5": "96ef444c11e968e4c6f81c0db4846b58",
                "sha256": "448d6b2ffcf60bd3a3b05c679e64902d4fd34c1df037fa61e2979ffe35696eca"
            },
            "downloads": -1,
            "filename": "FileFly-0.1.2-cp312-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "96ef444c11e968e4c6f81c0db4846b58",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.7",
            "size": 131469,
            "upload_time": "2024-05-08T08:39:36",
            "upload_time_iso_8601": "2024-05-08T08:39:36.774675Z",
            "url": "https://files.pythonhosted.org/packages/e8/36/b3a1ad591514ba16c72b682f26bdb11af1477d01ce9c3916f39486635365/FileFly-0.1.2-cp312-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-08 08:39:36",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "filefly"
}
        
Elapsed time: 0.61899s