filezen.scanner package¶
Submodules¶
filezen.scanner.scanner module¶
NOTE ON SCANNER¶
- This program contains some
generic functions like directory validation, getting file extension, etc.
-
class
filezen.scanner.scanner.Scanner¶ Bases:
objectThis class is used as a parent/super class for Simple & Advanced Scanners
-
static
checkAndMove(sourceFile, destination)¶ checks if a file with same name is already present in a folder, if not then moves the sourceFile to destination
Parameters: - sourceFile (string) – absolute path of file to move
- destination (string) – absolute path of the destination
Returns: 1 if file is moved properly, 0 if a same file name is already present
-
static
getFileExtension(file)¶ finds the file extension
Parameters: file (string) – the file whose extension is needed Returns: extension of the file
-
static
isValidDir(path)¶ checks whether the given path exists in the directory or not
Parameters: path (string) – the path to check Returns: 1 if path exists, 0 if it doesn’t
-
static
readRootFiles(inputPath)¶ read files present in the inputPath which are needed to be organized/moved
Parameters: inputPath (string) – the input folder where the cluttered files reside Returns: list of files present in inputPath
-
static