org.apache.ignite.ml.inference.storage.model

## Interface ModelStorage

- All Known Implementing Classes:
    DefaultModelStorage

      public interface ModelStorage

  Storage that allows to load, keep and get access to model in byte representation.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `exists(String path)` Returns `true` if a regular file or directory exist, otherwise `false`.
    `byte[]` | `getFile(String path)` Returns file content.
    `boolean` | `isDirectory(String path)` Returns `true` if the specified path associated with a directory.
    `boolean` | `isFile(String path)` Returns `true` if the specified path associated with a regular file.
    `Set<String>` | `listFiles(String path)` Returns list of files in the specified directory.
    `default void` | `mkdir(String path)` Creates directory.
    `void` | `mkdir(String path, boolean onlyIfNotExist)` Creates directory.
    `void` | `mkdirs(String path)` Creates directory and all required parent directories in the path.
    `default void` | `putFile(String path, byte[] data)` Creates a new or replaces existing file.
    `void` | `putFile(String path, byte[] data, boolean onlyIfNotExist)` Creates a new or replaces existing file.
    `void` | `remove(String path)` Removes specified directory or file.

- - ### Method Detail

    - #### putFile

          void putFile(String path,
                       byte[] data,
                       boolean onlyIfNotExist)

      Creates a new or replaces existing file.
      Parameters:
        `path` - Path to file.
        `data` - File content.
        `onlyIfNotExist` - If file already exists throw an exception.

    - #### putFile

          default void putFile(String path,
                               byte[] data)

      Creates a new or replaces existing file.
      Parameters:
        `path` - Path to file.
        `data` - File content.

    - #### getFile

          byte[] getFile(String path)

      Returns file content.
      Parameters:
        `path` - Path to file.
      Returns:
        File content.

    - #### mkdir

          void mkdir(String path,
                     boolean onlyIfNotExist)

      Creates directory.
      Parameters:
        `path` - Path to directory.
        `onlyIfNotExist` - If directory already exists throw an exception.

    - #### mkdir

          default void mkdir(String path)

      Creates directory.
      Parameters:
        `path` - Path to directory.

    - #### mkdirs

          void mkdirs(String path)

      Creates directory and all required parent directories in the path.
      Parameters:
        `path` - Path to directory.

    - #### listFiles

          Set<String> listFiles(String path)

      Returns list of files in the specified directory.
      Parameters:
        `path` - Path to directory.
      Returns:
        List of files in the specified directory.

    - #### remove

          void remove(String path)

      Removes specified directory or file.
      Parameters:
        `path` - Path to directory or file.

    - #### exists

          boolean exists(String path)

      Returns `true` if a regular file or directory exist, otherwise `false`.
      Parameters:
        `path` - Path to directory or file.
      Returns:
        `true` if a regular file or directory exist, otherwise `false`.

    - #### isDirectory

          boolean isDirectory(String path)

      Returns `true` if the specified path associated with a directory.
      Parameters:
        `path` - Path to directory or file.
      Returns:
        `true` if the specified path associated with a directory.

    - #### isFile

          boolean isFile(String path)

      Returns `true` if the specified path associated with a regular file.
      Parameters:
        `path` - Path to directory or file.
      Returns:
        `true` if the specified path associated with a regular file.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020