filezen.advancedScanner package¶
Submodules¶
filezen.advancedScanner.advancedscanner module¶
NOTE ON ADVANCEDSCANNER¶
- This program uses the FREQUENCYHEAP to
maintain the most used folder location to store files of a particular type.
- Using the heap built, it move the files to the
corresponding directory.
- If a file with the same name is already present in
that mapping directory, then the file won’t be moved.
-
class
filezen.advancedScanner.advancedscanner.AdvancedScanner¶ Bases:
filezen.scanner.scanner.ScannerThis class maintains a dictionary with key being the file type and value being a FREQUENCYHEAP. It then move the files according to this dictionary. Inherits some methods from Scanner.
-
cleanDirectory(inputPath, depth=5, outputPath=None)¶ The main functions which takes inputPath, outputPath, depth and validates them. Then calling the required functions in order to move the files to their respective locations
Parameters: - outputPath (string) – absolute path of the folder containing output files
- depth (integer) – levels of folders to scan
- inputPath (string) – absolute path of the folder containing input files
Returns: json containing list of file that were moved/not-moved
-
setDepth(depth)¶ set the depth of scanning
Parameters: depth (int) – the depth up to which scanning would be done
-
setOutputPath(outputPath)¶ set the output folder
Parameters: outputPath (string) – the output folder where the files needs to be moved
-