Class MockSystemReader.MockConfig

Enclosing class:
MockSystemReader

private static final class MockSystemReader.MockConfig extends FileBasedConfig
  • Constructor Details

    • MockConfig

      private MockConfig(File cfgLocation, FS fs)
  • Method Details

    • load

      public void load() throws IOException, ConfigInvalidException
      Description copied from class: FileBasedConfig
      Load the configuration from the persistent store.

      If the configuration does not exist, this configuration is cleared, and thus behaves the same as though the backing store exists, but is empty.

      Load the configuration as a Git text style configuration file.

      If the file does not exist, this configuration is cleared, and thus behaves the same as though the file exists, but is empty.

      Overrides:
      load in class FileBasedConfig
      Throws:
      IOException - the configuration could not be read (but does exist).
      ConfigInvalidException - the configuration is not properly formatted.
    • save

      public void save() throws IOException
      Description copied from class: FileBasedConfig
      Save the configuration to the persistent store.

      Save the configuration as a Git text style configuration file.

      Warning: Although this method uses the traditional Git file locking approach to protect against concurrent writes of the configuration file, it does not ensure that the file has not been modified since the last read, which means updates performed by other objects accessing the same backing file may be lost.

      Overrides:
      save in class FileBasedConfig
      Throws:
      IOException - the configuration could not be written.
    • isOutdated

      public boolean isOutdated()
      Description copied from class: FileBasedConfig
      Whether the currently loaded configuration file is outdated
      Overrides:
      isOutdated in class FileBasedConfig
      Returns:
      returns true if the currently loaded configuration file is older than the file on disk
    • toString

      public String toString()
      Description copied from class: FileBasedConfig
      Overrides:
      toString in class FileBasedConfig