This is a basic File System created using Java Object Oriented Principles.
I have provided the functions to create, move, delete entities and write to a text file.
######User can,
- create, move, delete any entity.
- write string to a Text File.
######User cannot,
- move or delete any entities in/from a zipFile.
- set/update size of an entity.
######FILESYSTEM STRUCTURE:
- File System has set of Drives with the default C drive.
- Each Drive, Folder and ZipFiles can contain Folders, ZipFiles and TextFiles.
######CLASSES:
- Abstract Class FileSystem.
- Abstract Class Entity that extends to FileSystem.
- Classes Drive, Folder, ZipFile and TextFile extends Entity.
- Classes for Custom Exceptions.
######THINGS TO NOTE:
- FileSystem creates a default C drive to serve the user well.
- To avoid duplicates, every Entity maintains a Set of Entity Names it contains.
- Size gets updated automatically when you write or change the contents of a text file.
- Size of an entity is calculated recursively with the entities they hold.
- Size of a textFile is equal to the size of its contents.
- Size of a Folder, Drive and zipFile is measured with the sum of sizes of its contents
- Size of a zipFile is always half its actual size.