A python module providing tools for searching files (or directories).一个用于搜索文件或文件夹的Python模块。
Project description
search-file - A python module providing tools for searching files(or directories). 一个用于搜索文件或文件夹的Python模块。
- 包含的函数 FUNCTIONS:
- directories(path):
一个生成器, 列出path下的所有子目录和文件名。
如:
>>> 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中搜索一个文件或文件夹。
如:
>>> 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_/
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
search-file-1.2.3.1.tar.gz
(4.6 kB
view details)
File details
Details for the file search-file-1.2.3.1.tar.gz
.
File metadata
- Download URL: search-file-1.2.3.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8a09d359138f2c81f0527eb2f229e10affabb791467721d77d9730e24ecf8a9 |
|
MD5 | dae1b60ff141e30b1dfc873edadb55ab |
|
BLAKE2b-256 | d5be4e264e07b16b51ebc1f2649dc5f329b96fa98c505d0043c51222dca9703a |