Table of Contents
This project emulates a file manager, the python script can perform four basic operations:
- Create a directory
- Move a directory to another directory
- Delete a directory
- List all directories
All operations are executed starting at the base directory or "home" which doesn't have a name.
The sequence of operations to perform are read from an input file. Operations are defined using the following format:
- LIST
- CREATE <directory to create>
- MOVE <directory to move> <destination directory>
- DELETE <directory to remove>
CREATE, MOVE and DELETE operations require the full path to the directories, there can't be multiple directories with the same name within another directory.
To run the script Python 3 must be installed.
- Visit https://www.python.org/downloads to download Python 3.7 or later
- Clone the repo
git clone https://github.com/agodi/Endpoint-Challenge.git
To run the script open a terminal, go to the directory where this repo was cloned and enter the following command:
python challenge.py <input-file>
Replace <input-file> with the full path to the file you desire to use as input. If no path is provided the script will try to use the file input.txt included in this repo.