Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment you will implement the remaining functionality of your command interpreter . The syntaxes are: (For LIST) LIST or LIST path This will

In this assignment you will implement the remaining functionality of your command interpreter.

The syntaxes are:

(For LIST)

LIST

or

LIST path

This will require the following two library functions (in Python)

os.path.exists(path) Returns true if path exists.

os.listdir(path) returns a python list of contents of directory.

os.getcwd() Returns the path of current directory.

(For the rest)

CHDIR path

REMOVE path/file

RENAME old new

This will require the following two library functions (in Python)

os.chdir(path) Changes current working directory to path

os.remove(path) Removes the file name path from current working directory

os.rmdir(path) Removes the directory named path from the current directory

os.rename(old,new) Renames the file or directory named old to new

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions