mdfind wrapper
Project description
Install
$ [sudo] pip install mdfind
Functions
function | description |
---|---|
mdfind.count(query=None, name=None, onlyin=None) |
return search results count |
mdfind.mdfind(args) |
execute mdfind with arguments |
mdfind.name(name, onlyin=None) |
mdfind -name name search by name |
mdfind.query(query, onlyin=None) |
search by Spotlight query |
Examples
>>> import mdfind
>>> mdfind.name('Group Containers')
['/Users/username/Library/Group Containers']
>>> mdfind.query('kMDItemContentType==public.shell-script')
[...]
>>> mdfind.count(query='kMDItemContentType==public.mp3')
42
>>> mdfind.count(name='Group Containers')
1
>>> mdfind.mdfind(['-count','-onlyin','/usr','kMDItemContentType==public.shell-script'])
42
Links
readme-md - README.md generator
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mdfind-2018.11.20.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for mdfind-2018.11.20-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07c82bc2c9a98ed154013905a17c95cfaf37c04638117efaf5b9d87780e23d29 |
|
MD5 | cfd03f33eee793f030cfdd2cd0cfdc3a |
|
BLAKE2b-256 | 46904eae40474e58aa6d6536cbe9f0c284652225e4bc6b8c47421ddf1680443b |