search-file - *A python module that supplies tools to search files(or folders).*
一个用于搜索文件或文件夹的Python模块。
:包含的函数 FUNCTIONS:
:directories(path):
- 一个生成器, 列出path下的所有子目录和文件名。
- 如:
.. code-block:: python
>>> from search_file import directories
>>> list(directories("C:"))
['C:\Users', #第一层目录
'C:\\\\Users\\\\Administrator', #第二层目录
...,
'C:\Windows',
'C:\\\\Windows\\\\System32',
...]
dirs: 是否列出目录
files: 是否列出文件
:search(filename,path,minsize=0,maxsize=None):
- 一个生成器,在path中搜索一个文件或文件夹。
- 如:
.. code-block:: python
>>> from search_file import search
>>> list(search("cmd.exe","C:"))
['C:\\\\Windows\\\\System32\\\\cmd.exe',
...]
:版本 VERSION:
1.2.3
源代码:https://github.com/qfcy/Python/blob/main/search_file.py
最近更新(2022-2):增加了多个测试程序。
作者:*七分诚意 qq:3076711200* 百度贴吧账号:qfcy\_
作者CSDN主页: https://blog.csdn.net/qfcy\_/
Raw data
{
"_id": null,
"home_page": "https://github.com/qfcy/Python/blob/main/search_file.py",
"name": "search-file",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "path,search,file,directories,automation",
"author": "\u4e03\u5206\u8bda\u610f qq:3076711200",
"author_email": "3076711200@qq.com",
"download_url": "https://files.pythonhosted.org/packages/31/40/afa8a43186690738fc0c9bb92ea2e7e3aaad00c6536d41b4b1a04b154f32/search-file-1.2.3.tar.gz",
"platform": null,
"description": "search-file - *A python module that supplies tools to search files(or folders).*\r\n\u4e00\u4e2a\u7528\u4e8e\u641c\u7d22\u6587\u4ef6\u6216\u6587\u4ef6\u5939\u7684Python\u6a21\u5757\u3002\r\n\r\n:\u5305\u542b\u7684\u51fd\u6570 FUNCTIONS:\r\n\r\n:directories(path):\r\n\r\n- \u4e00\u4e2a\u751f\u6210\u5668, \u5217\u51fapath\u4e0b\u7684\u6240\u6709\u5b50\u76ee\u5f55\u548c\u6587\u4ef6\u540d\u3002\r\n- \u5982:\r\n\r\n.. code-block:: python\r\n\r\n >>> from search_file import directories\r\n >>> list(directories(\"C:\"))\r\n ['C:\\Users', #\u7b2c\u4e00\u5c42\u76ee\u5f55\r\n 'C:\\\\\\\\Users\\\\\\\\Administrator', #\u7b2c\u4e8c\u5c42\u76ee\u5f55\r\n ...,\r\n 'C:\\Windows',\r\n 'C:\\\\\\\\Windows\\\\\\\\System32',\r\n ...]\r\n\r\ndirs: \u662f\u5426\u5217\u51fa\u76ee\u5f55\r\nfiles: \u662f\u5426\u5217\u51fa\u6587\u4ef6\r\n\r\n:search(filename,path,minsize=0,maxsize=None):\r\n\r\n- \u4e00\u4e2a\u751f\u6210\u5668,\u5728path\u4e2d\u641c\u7d22\u4e00\u4e2a\u6587\u4ef6\u6216\u6587\u4ef6\u5939\u3002\r\n- \u5982:\r\n\r\n.. code-block:: python\r\n\r\n >>> from search_file import search\r\n >>> list(search(\"cmd.exe\",\"C:\"))\r\n ['C:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\cmd.exe',\r\n ...]\r\n\r\n:\u7248\u672c VERSION:\r\n\r\n 1.2.3\r\n\r\n\u6e90\u4ee3\u7801:https://github.com/qfcy/Python/blob/main/search_file.py\r\n\r\n\u6700\u8fd1\u66f4\u65b0(2022-2):\u589e\u52a0\u4e86\u591a\u4e2a\u6d4b\u8bd5\u7a0b\u5e8f\u3002\r\n\r\n\u4f5c\u8005:*\u4e03\u5206\u8bda\u610f qq:3076711200* \u767e\u5ea6\u8d34\u5427\u8d26\u53f7:qfcy\\_\r\n\r\n\u4f5c\u8005CSDN\u4e3b\u9875: https://blog.csdn.net/qfcy\\_/\r\n",
"bugtrack_url": null,
"license": "",
"summary": "A python module that supplies tools to search files(or directories).\u4e00\u4e2a\u7528\u4e8e\u641c\u7d22\u6587\u4ef6\u6216\u6587\u4ef6\u5939\u7684Python\u6a21\u5757\u3002",
"version": "1.2.3",
"project_urls": {
"Homepage": "https://github.com/qfcy/Python/blob/main/search_file.py"
},
"split_keywords": [
"path",
"search",
"file",
"directories",
"automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3140afa8a43186690738fc0c9bb92ea2e7e3aaad00c6536d41b4b1a04b154f32",
"md5": "e6de3dd203eb3f18bc10789a819246b5",
"sha256": "c4bd128bfc69a3950dc8014842272e48f9c2f6a775dff51417c0744998a30d4a"
},
"downloads": -1,
"filename": "search-file-1.2.3.tar.gz",
"has_sig": false,
"md5_digest": "e6de3dd203eb3f18bc10789a819246b5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4549,
"upload_time": "2024-01-09T12:03:32",
"upload_time_iso_8601": "2024-01-09T12:03:32.521970Z",
"url": "https://files.pythonhosted.org/packages/31/40/afa8a43186690738fc0c9bb92ea2e7e3aaad00c6536d41b4b1a04b154f32/search-file-1.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-09 12:03:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "qfcy",
"github_project": "Python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "search-file"
}