diff --git a/build.py b/build.py new file mode 100644 index 0000000..2bce11b --- /dev/null +++ b/build.py @@ -0,0 +1,9 @@ +import os +from util import get_drives() +def build(after,*starts): + if starts: + paths = starts + else: + paths = get_drives() + for path in paths: + for root,dirs,files in os.walk( \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..689bea7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +binaryornot +ctypes \ No newline at end of file diff --git a/util.py b/util.py index 30cba7f..a478222 100644 --- a/util.py +++ b/util.py @@ -1,4 +1,17 @@ -def pparent(paths): +from ctypes import windll +#https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python u=RichieHindle +def get_drives(): + uppercase = map(chr,range(ord('A'),ord('A')+26)) + drives = [] + bitmask = windll.kernel32.GetLogicalDrives() + for letter in uppercase: + if bitmask & 1: + drives.append(f'{letter}:\\') + bitmask >>= 1 + + return drives + +def no_parents(paths): paths = sorted(paths,key=len) first = True ret = []