Directory-Manager is a program that imitates the traditional bash shell, which allows you to manage your files and folders with the basic commands.
-
Tree.h
Tree.hincludes all the header files necessary, structures created, and the declarations for the functions used inTree.c. -
Tree.c
Tree.cincludes all the function implementations required to create the left child right sibling tree data structure and nodes. -
hash.h
hash.hincludes all the header files necessary, structures created, and the declarations for the functions used inhash.c. -
hash.c
Hash.cincludes all the function implementations required to create and implement the hash table that is used in storing the aliases of the directories. -
Directory.h
Directory.hincludes all the header files necessary, structures created, and the declarations for the functions used inDirectory.c. -
Directory.c
Directory.cincludes all the function implementations required to implement theadd,move,alias,teleport,find,ls, andquitfunctionalities. -
Main.c
Main.cincludes the function calls for the various features and menu interface. The entire codebase is included in this file.
git clone https://github.com/SwethaVipparla/Directory-Manager.git
cd Directory-Manager/
gcc Main.c -o Main
./Main
Once the code is up and running, a menu appears, asking for the input corresponding to the function wished to execute. A command can be chosen from the list of features available.
Adds a file or directory to the current directory
add di/fi <new_name>
Note: The name entered must be a single word.
Changes the current directory to another directory
move <path_to_destination_directory>
Note:
Since the initial directory we're in is "root", the path should be of the form "root/Directory1/Directory2/..."
The function takes you inside the last directory you entered. You must enter the complete path. If an incorrect path is entered, no change in the current position is performed.
For example:move root/Dir1/Dir12/Dir123will move you inside the Dir123 directory.
Saves a directory with an alias
alias <path_to_directory> <new_alias>
Note:
Take care of format of address.
Alias can only be stored for directory addresses, as specified in the document. Alias must be a single word.
Changes the current directory to another directory by taking in an existing alias
teleport <existing_alias>
Finds directories and files with a given prefix inside the current directory
find <prefix>
Note: The prefix must be a single word.
Lists the contents of the current directory
ls
Exits the program
quit
Note: Make sure to add QUIT at the end of the test file if the input is taken via a text file.