Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Develop an application that uses file and directory access to encode their structure in a JSON file given a root directory. Create a python

1. Develop an application that uses file and directory access to encode their structure in a JSON file given a root directory. Create a python application that given a command-line argument of a root directory, it will traverse that directory and all subdirectories, saving into a file called struct.dat the JSON representation of the hierarchy of files and directory discovered. Use the following information to name file and directory in the JSON representation of the file/dir hierarchy,

File, Dir, SubDir

This file should be stored in the location that the program is executed and should override the file if it already exist.

2. The program you created writes a JSON file. Is this a text or binary file? Discuss and justify why you would do it as a text file or a binary file. Justify, if done in binary, how would that work and what are the implications of saving the file and dir hierarchy as a binary file in saving and accessing it.

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

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions