mdfind wrapper
Project description
Installation
$ [sudo] pip install mdfind
Functions
function | __doc__ |
---|---|
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
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-2019.3.22.tar.gz
(1.8 kB
view hashes)
Built Distribution
mdfind-2019.3.22-py2.py3-none-any.whl
(129.5 kB
view hashes)
Close
Hashes for mdfind-2019.3.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34cf3b1d88a24240df3646934e436715e753930e82a05a11d5eb17c749286dd8 |
|
MD5 | 4ca99c8912bff79fc7f52ecb6d5b032e |
|
BLAKE2b-256 | 40afb96a53ba97a34aaf3b3c2c41bd4135290ece7647dfedae6c881746693e64 |