Skip to content

yochayme/broadcom-hw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

broadcom-hw

We would like to build a terminal application, which will be able to interact with the file system.

The filesystem is composed of the following entities:

  • File
  • Folder - which can contain multiple files, folders, and/or symbolic links.
  • Symbolic link - a reference to either a file, folder or symbolic link.

We can open a terminal in a specific folder.

Terminal lets us run the following functions:

  1. listFiles - should print the following line (file name, type, size) for each entity in the folder. (For symbolic links, you should present the size of the real file it references).
  2. listRecursiveFiles - should print a tree of entities in the current folder. To visualize subfolder depth, an indentation of 4 spaces should be used. Files are presented first, then sub-folders. For example:
                                folder
                                    file
                                folder
                                    file
                                    folder
                                        file
                                        file
                                        
  1. calculateFolderSize - returns the size of everything contained in the current folder, including subfolders. Here, the symbolic links are counted as having no size.
  2. listFiles and listRecursiveFiles could get a following filters:
    • Start with text
    • End with text
    • Contains text
    • Type
    • Greater than size
  3. cd - change the current folder (absolute)
  4. pwd - should print the current folder
  5. createFile (name and size) - create a file under the current folder
  6. createFolder (name) - create a folder under the current folder
  7. createSymbolicLink (name, reference) - create a symbolic link under the current folder
  8. Validation - entity name in specific folder is unique.
  9. Write unit tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%