antfs

Python3 Apache Ant path patterns matching library


Keywords
ant, pattern, matching, glob, regexp, file, selector
License
MIT
Install
pip install antfs==1.0.4

Documentation

antfs: Python3 Ant path matching library

Usage:

Select file paths matched the specified ant path pattern :

>>> ds = AntPatternDirectoryScanner("foo/bar", "foo/**/*.txt")
... for filename in ds.scan():
...    print(filename)
...

Copy matched files into target directory:

>>> ds = AntPatternDirectoryScanner("foo/bar", "data/**/*.txt")
... ds.copy("target/dir")

Installation:

(A): Installation with pip

umask 022
sudo pip3 install antfs

# Upgrading:
sudo pip3 install antfs --upgrade

(B): Installation from sources

umask 022
git clone https://github.com/Softmotions/antfs.git
cd ./antfs
sudo python3 ./setup.py install