agodi / Endpoint-Challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage

About The Project

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.

(back to top)

Getting Started

Prerequisites

To run the script Python 3 must be installed.

Installation

  1. Clone the repo
    git clone https://github.com/agodi/Endpoint-Challenge.git

(back to top)

Usage

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.

(back to top)

About


Languages

Language:Python 100.0%