## Class Driver

- java.lang.Object
- - Driver

-     public class Driver
      extends java.lang.Object

  This is the main class of the program. It provides a way to readBytes an Ext2 Filesystem image, based on the path that will be provided by the user, as a string.
  Author:
    Petros Soutzis, 2017-19

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static java.lang.String` | `currentDir`
    `private static Inode` | `inode`
    `private static java.util.Stack<java.lang.String>` | `pathStack`
    `private static boolean` | `running`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Driver()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private static void` | `getCommandAndExecute(java.lang.String input, int inodeSize, Superblock sBlock, GroupDescriptor groupDesc, Ext2File ext2)` This method will divide the user's input into a command and a target path and execute the given command.
    `private static java.lang.String` | `getComputerName()`
    `private static void` | `getCurrentPathName(java.lang.String[] pathArray)` Method to get the current-path.
    `private static boolean` | `getInputYesNo()` If the user enters anything else than Y/y or N/n, they will be prompted to re-enter their decision.
    `static void` | `main(java.lang.String[] args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### inode

          private static Inode inode

    - #### currentDir

          private static java.lang.String currentDir

    - #### pathStack

          private static java.util.Stack<java.lang.String> pathStack

    - #### running

          private static boolean running

  - ### Constructor Detail

    - #### Driver

          public Driver()

  - ### Method Detail

    - #### getComputerName

          private static java.lang.String getComputerName()

      Returns:
        An identifier for the computer that currently runs the program

    - #### getCurrentPathName

          private static void getCurrentPathName(java.lang.String[] pathArray)

      Method to get the current-path. Utilises a global stack and String.
      Parameters:
        `pathArray` - The array containing the path values (leaps)

    - #### getInputYesNo

          private static boolean getInputYesNo()

      If the user enters anything else than Y/y or N/n, they will be prompted to re-enter their decision.
      Returns:
        true if user enters Y/y, or false if user enters N/n.

    - #### getCommandAndExecute

          private static void getCommandAndExecute(java.lang.String input,
                                                   int inodeSize,
                                                   Superblock sBlock,
                                                   GroupDescriptor groupDesc,
                                                   Ext2File ext2)
                                            throws java.io.IOException

      This method will divide the user's input into a command and a target path and execute the given command.
      Parameters:
        `input` - The user's raw input
        `inodeSize` - The size of any inode on this FS.
        `sBlock` - The superblock of this FS.
        `groupDesc` - The group descriptor of this FS.
        `ext2` - The Ext2File instance of the FS.
      Throws:
        `java.io.IOException` - This is not actually correct, the exception should be handled in Ext2File, but who cares.

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`