org.apache.ignite.internal.processors.igfs

## Class IgfsAsyncImpl

- java.lang.Object
- - org.apache.ignite.internal.AsyncSupportAdapter<IgniteFileSystem>
  - - org.apache.ignite.internal.processors.igfs.IgfsAsyncImpl

All Implemented Interfaces:
  IgniteFileSystem, IgfsEx, IgniteAsyncSupport

    public class IgfsAsyncImpl
    extends AsyncSupportAdapter<IgniteFileSystem>
    implements IgfsEx

Igfs supporting asynchronous operations.

### Field Summary

### Fields inherited from class org.apache.ignite.internal.AsyncSupportAdapter

`curFut`

### Fields inherited from interface org.apache.ignite.IgniteFileSystem

`IGFS_SCHEME`

### Constructor Summary

Constructors
Constructor and Description
`IgfsAsyncImpl(IgfsImpl igfs)`

### Method Summary

Methods
`Collection<IgfsBlockLocation>` `affinity(IgfsPath path, long start, long len)` Gets affinity block locations for data blocks of the file, i.e. the nodes, on which the blocks are stored.
`Collection<IgfsBlockLocation>` `affinity(IgfsPath path, long start, long len, long maxLen)` Get affinity block locations for data blocks of the file.
`IgfsOutputStream` `append(IgfsPath path, boolean create)` Opens an output stream to an existing file for appending data.
`IgfsOutputStream` `append(IgfsPath path, int bufSize, boolean create, Map<String,String> props)` Opens an output stream to an existing file for appending data.
`IgfsSecondaryFileSystem` `asSecondary()` Return the given IGFS as a secondary file system.
`void` `await(IgfsPath... paths)` Await for any pending finished writes on the children paths.
`void` `clear()` Formats the file system removing all existing entries from it, but not removing anything in secondary file system (if any).
`IgniteFuture<Void>` `clearAsync()` Formats the file system removing all existing entries from it, but not removing anything in secondary file system (if any).
`String` `clientLogDirectory()` Gets client file system log directory.
`void` `clientLogDirectory(String logDir)` Sets client file system log directory.
`FileSystemConfiguration` `configuration()` Gets IGFS configuration.
`IgfsContext` `context()`
`IgfsOutputStream` `create(IgfsPath path, boolean overwrite)` Creates a file and opens it for writing.
`IgfsOutputStream` `create(IgfsPath path, int bufSize, boolean overwrite, IgniteUuid affKey, int replication, long blockSize, Map<String,String> props)` Creates a file and opens it for writing.
`IgfsOutputStream` `create(IgfsPath path, int bufSize, boolean overwrite, int replication, long blockSize, Map<String,String> props)` Creates a file and opens it for writing.
`boolean` `delete(IgfsPath path, boolean recursive)` Deletes file.
`boolean` `evictExclude(IgfsPath path, boolean primary)` Whether this path is excluded from evictions.
`<T,R> R` `execute(Class<? extends IgfsTask<T,R>> taskCls, IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, T arg)` Executes IGFS task with overridden maximum range length (see `FileSystemConfiguration.getMaximumTaskRangeLength()` for more information).
`<T,R> R` `execute(Class<? extends IgfsTask<T,R>> taskCls, IgfsRecordResolver rslvr, Collection<IgfsPath> paths, T arg)` Executes IGFS task.
`<T,R> R` `execute(IgfsTask<T,R> task, IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, T arg)` Executes IGFS task with overridden maximum range length (see `FileSystemConfiguration.getMaximumTaskRangeLength()` for more information).
`<T,R> R` `execute(IgfsTask<T,R> task, IgfsRecordResolver rslvr, Collection<IgfsPath> paths, T arg)` Executes IGFS task.
`<T,R> IgniteFuture<R>` `executeAsync(Class<? extends IgfsTask<T,R>> taskCls, IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, T arg)` Executes IGFS task asynchronously with overridden maximum range length (see `FileSystemConfiguration.getMaximumTaskRangeLength()` for more information).
`<T,R> IgniteFuture<R>` `executeAsync(Class<? extends IgfsTask<T,R>> taskCls, IgfsRecordResolver rslvr, Collection<IgfsPath> paths, T arg)` Executes IGFS task asynchronously.
`<T,R> IgniteFuture<R>` `executeAsync(IgfsTask<T,R> task, IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, T arg)` Executes IGFS task asynchronously with overridden maximum range length (see `FileSystemConfiguration.getMaximumTaskRangeLength()` for more information).
`<T,R> IgniteFuture<R>` `executeAsync(IgfsTask<T,R> task, IgfsRecordResolver rslvr, Collection<IgfsPath> paths, T arg)` Executes IGFS task asynchronously.
`boolean` `exists(IgfsPath path)` Checks if the specified path exists in the file system.
`Boolean` `globalSampling()` Get sampling state.
`void` `globalSampling(Boolean val)` Enables, disables or clears sampling flag.
`IgfsStatus` `globalSpace()` Gets global space counters.
`long` `groupBlockSize()` Gets group block size, i.e. block size multiplied by group size in affinity mapper.
`IgfsFile` `info(IgfsPath path)` Gets file information for the specified path.
`boolean` `isProxy(URI path)` Check whether the given path is proxy path.
`Collection<IgfsFile>` `listFiles(IgfsPath path)` Lists files under the specified path.
`Collection<IgfsPath>` `listPaths(IgfsPath path)` Lists file paths under the specified path.
`IgfsMetrics` `metrics()` Gets metrics snapshot for this file system.
`void` `mkdirs(IgfsPath path)` Creates directories under specified path.
`void` `mkdirs(IgfsPath path, Map<String,String> props)` Creates directories under specified path with the specified properties.
`IgfsMode` `mode(IgfsPath path)` Get mode for the given path.
`String` `name()` Gets IGFS name.
`IgniteUuid` `nextAffinityKey()` Get next affinity key.
`IgfsInputStream` `open(IgfsPath path)` Opens a file for reading.
`IgfsInputStream` `open(IgfsPath path, int bufSize)` Opens a file for reading.
`IgfsInputStream` `open(IgfsPath path, int bufSize, int seqReadsBeforePrefetch)` Opens a file for reading.
`void` `rename(IgfsPath src, IgfsPath dest)` Renames/moves a file.
`void` `resetMetrics()` Resets metrics for this file system.
`void` `setTimes(IgfsPath path, long modificationTime, long accessTime)` Sets last access time and last modification time for a given path.
`long` `size(IgfsPath path)` Determines size of the file denoted by provided path.
`void` `stop(boolean cancel)` Stops IGFS cleaning all used resources.
`IgfsPathSummary` `summary(IgfsPath path)` Gets summary (total number of files, total number of directories and total length) for a given path.
`IgfsFile` `update(IgfsPath path, Map<String,String> props)` Updates file information for the specified path.
`long` `usedSpaceSize()` Gets used space in bytes.

### Methods inherited from class org.apache.ignite.internal.AsyncSupportAdapter

`createAsyncInstance, createFuture, future, future, isAsync, saveOrGet, withAsync`

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

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

### Methods inherited from interface org.apache.ignite.IgniteFileSystem

`withAsync`

### Methods inherited from interface org.apache.ignite.lang.IgniteAsyncSupport

`future, isAsync`

### Constructor Detail

#### IgfsAsyncImpl

    public IgfsAsyncImpl(IgfsImpl igfs)

Parameters:
  `igfs` - Igfs.

### Method Detail

#### clear

    public void clear()

Formats the file system removing all existing entries from it, but not removing anything in secondary file system (if any).

Specified by:
  `clear` in interface `IgniteFileSystem`

#### clearAsync

    public IgniteFuture<Void> clearAsync()
                                  throws IgniteException

Formats the file system removing all existing entries from it, but not removing anything in secondary file system (if any).

Specified by:
  `clearAsync` in interface `IgniteFileSystem`
Returns:
  Future representing pending completion of the clear operation.
Throws:
  `IgniteException`

#### execute

    public <T,R> R execute(IgfsTask<T,R> task,
                  @Nullable
                  IgfsRecordResolver rslvr,
                  Collection<IgfsPath> paths,
                  @Nullable
                  T arg)

Executes IGFS task.

Specified by:
  `execute` in interface `IgniteFileSystem`
Parameters:
  `task` - Task to execute.
  `rslvr` - Optional resolver to control split boundaries.
  `paths` - Collection of paths to be processed within this task.
  `arg` - Optional task argument.
Returns:
  Task result.

#### executeAsync

    public <T,R> IgniteFuture<R> executeAsync(IgfsTask<T,R> task,
                                     @Nullable
                                     IgfsRecordResolver rslvr,
                                     Collection<IgfsPath> paths,
                                     @Nullable
                                     T arg)
                                 throws IgniteException

Executes IGFS task asynchronously.

Specified by:
  `executeAsync` in interface `IgniteFileSystem`
Parameters:
  `task` - Task to execute.
  `rslvr` - Optional resolver to control split boundaries.
  `paths` - Collection of paths to be processed within this task.
  `arg` - Optional task argument.
Returns:
  a Future representing pending completion of the task.
Throws:
  `IgniteException` - If execution failed.

#### execute

    public <T,R> R execute(IgfsTask<T,R> task,
                  @Nullable
                  IgfsRecordResolver rslvr,
                  Collection<IgfsPath> paths,
                  boolean skipNonExistentFiles,
                  long maxRangeLen,
                  @Nullable
                  T arg)

Executes IGFS task with overridden maximum range length (see `FileSystemConfiguration.getMaximumTaskRangeLength()` for more information).

Supports asynchronous execution (see `IgniteAsyncSupport`).

Specified by:
  `execute` in interface `IgniteFileSystem`
Parameters:
  `task` - Task to execute.
  `rslvr` - Optional resolver to control split boundaries.
  `paths` - Collection of paths to be processed within this task.
  `skipNonExistentFiles` - Whether to skip non existent files. If set to `true` non-existent files will be ignored. Otherwise an exception will be thrown.
  `maxRangeLen` - Optional maximum range length. If `0`, then by default all consecutive IGFS blocks will be included.
  `arg` - Optional task argument.
Returns:
  Task result.

#### executeAsync

    public <T,R> IgniteFuture<R> executeAsync(IgfsTask<T,R> task,
                                     @Nullable
                                     IgfsRecordResolver rslvr,
                                     Collection<IgfsPath> paths,
                                     boolean skipNonExistentFiles,
                                     long maxRangeLen,
                                     @Nullable
                                     T arg)
                                 throws IgniteException

Executes IGFS task asynchronously with overridden maximum range length (see `FileSystemConfiguration.getMaximumTaskRangeLength()` for more information).

Specified by:
  `executeAsync` in interface `IgniteFileSystem`
Parameters:
  `task` - Task to execute.
  `rslvr` - Optional resolver to control split boundaries.
  `paths` - Collection of paths to be processed within this task.
  `skipNonExistentFiles` - Whether to skip non existent files. If set to `true` non-existent files will be ignored. Otherwise an exception will be thrown.
  `maxRangeLen` - Optional maximum range length. If `0`, then by default all consecutive IGFS blocks will be included.
  `arg` - Optional task argument.
Returns:
  a Future representing pending completion of the task.
Throws:
  `IgniteException` - If execution failed.

#### execute

    public <T,R> R execute(Class<? extends IgfsTask<T,R>> taskCls,
                  @Nullable
                  IgfsRecordResolver rslvr,
                  Collection<IgfsPath> paths,
                  @Nullable
                  T arg)

Executes IGFS task.

Supports asynchronous execution (see `IgniteAsyncSupport`).

Specified by:
  `execute` in interface `IgniteFileSystem`
Parameters:
  `taskCls` - Task class to execute.
  `rslvr` - Optional resolver to control split boundaries.
  `paths` - Collection of paths to be processed within this task.
  `arg` - Optional task argument.
Returns:
  Task result.

#### executeAsync

    public <T,R> IgniteFuture<R> executeAsync(Class<? extends IgfsTask<T,R>> taskCls,
                                     @Nullable
                                     IgfsRecordResolver rslvr,
                                     Collection<IgfsPath> paths,
                                     @Nullable
                                     T arg)
                                 throws IgniteException

Executes IGFS task asynchronously.

Specified by:
  `executeAsync` in interface `IgniteFileSystem`
Parameters:
  `taskCls` - Task class to execute.
  `rslvr` - Optional resolver to control split boundaries.
  `paths` - Collection of paths to be processed within this task.
  `arg` - Optional task argument.
Returns:
  a Future representing pending completion of the task.
Throws:
  `IgniteException` - If execution failed.

#### execute

    public <T,R> R execute(Class<? extends IgfsTask<T,R>> taskCls,
                  @Nullable
                  IgfsRecordResolver rslvr,
                  Collection<IgfsPath> paths,
                  boolean skipNonExistentFiles,
                  long maxRangeLen,
                  @Nullable
                  T arg)

Executes IGFS task with overridden maximum range length (see `FileSystemConfiguration.getMaximumTaskRangeLength()` for more information).

Supports asynchronous execution (see `IgniteAsyncSupport`).

Specified by:
  `execute` in interface `IgniteFileSystem`
Parameters:
  `taskCls` - Task class to execute.
  `rslvr` - Optional resolver to control split boundaries.
  `paths` - Collection of paths to be processed within this task.
  `skipNonExistentFiles` - Whether to skip non existent files. If set to `true` non-existent files will be ignored. Otherwise an exception will be thrown.
  `maxRangeLen` - Maximum range length.
  `arg` - Optional task argument.
Returns:
  Task result.

#### executeAsync

    public <T,R> IgniteFuture<R> executeAsync(Class<? extends IgfsTask<T,R>> taskCls,
                                     @Nullable
                                     IgfsRecordResolver rslvr,
                                     Collection<IgfsPath> paths,
                                     boolean skipNonExistentFiles,
                                     long maxRangeLen,
                                     @Nullable
                                     T arg)
                                 throws IgniteException

Executes IGFS task asynchronously with overridden maximum range length (see `FileSystemConfiguration.getMaximumTaskRangeLength()` for more information).

Specified by:
  `executeAsync` in interface `IgniteFileSystem`
Parameters:
  `taskCls` - Task class to execute.
  `rslvr` - Optional resolver to control split boundaries.
  `paths` - Collection of paths to be processed within this task.
  `skipNonExistentFiles` - Whether to skip non existent files. If set to `true` non-existent files will be ignored. Otherwise an exception will be thrown.
  `maxRangeLen` - Maximum range length.
  `arg` - Optional task argument.
Returns:
  a Future representing pending completion of the task.
Throws:
  `IgniteException` - If execution failed.

#### stop

    public void stop(boolean cancel)

Stops IGFS cleaning all used resources.

Specified by:
  `stop` in interface `IgfsEx`
Parameters:
  `cancel` - Cancellation flag.

#### context

    public IgfsContext context()

Specified by:
  `context` in interface `IgfsEx`
Returns:
  IGFS context.

#### open

    public IgfsInputStream open(IgfsPath path,
                       int bufSize,
                       int seqReadsBeforePrefetch)

Opens a file for reading.

Specified by:
  `open` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to read.
  `bufSize` - Read buffer size (bytes) or `zero` to use default value.
  `seqReadsBeforePrefetch` - Amount of sequential reads before prefetch is started.
Returns:
  File input stream to read data from.

#### open

    public IgfsInputStream open(IgfsPath path)

Opens a file for reading.

Specified by:
  `open` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to read.
Returns:
  File input stream to read data from.

#### open

    public IgfsInputStream open(IgfsPath path,
                       int bufSize)

Opens a file for reading.

Specified by:
  `open` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to read.
  `bufSize` - Read buffer size (bytes) or `zero` to use default value.
Returns:
  File input stream to read data from.

#### globalSpace

    public IgfsStatus globalSpace()
                           throws IgniteCheckedException

Gets global space counters.

Specified by:
  `globalSpace` in interface `IgfsEx`
Returns:
  Tuple in which first component is used space on all nodes, second is available space on all nodes.
Throws:
  `IgniteCheckedException` - If task execution failed.

#### globalSampling

    public void globalSampling(@Nullable
                      Boolean val)
                        throws IgniteCheckedException

Enables, disables or clears sampling flag.

Specified by:
  `globalSampling` in interface `IgfsEx`
Parameters:
  `val` - `True` to turn on sampling, `false` to turn it off, `null` to clear sampling state.
Throws:
  `IgniteCheckedException` - If failed.

#### globalSampling

    @Nullable
    public Boolean globalSampling()

Get sampling state.

Specified by:
  `globalSampling` in interface `IgfsEx`
Returns:
  `True` in case sampling is enabled, `false` otherwise, or `null` in case sampling flag is not set.

#### groupBlockSize

    public long groupBlockSize()

Gets group block size, i.e. block size multiplied by group size in affinity mapper.

Specified by:
  `groupBlockSize` in interface `IgfsEx`
Returns:
  Group block size.

#### clientLogDirectory

    @Nullable
    public String clientLogDirectory()

Gets client file system log directory.

Specified by:
  `clientLogDirectory` in interface `IgfsEx`
Returns:
  Client file system log directory or `null` in case no client connections have been created yet.

#### clientLogDirectory

    public void clientLogDirectory(String logDir)

Sets client file system log directory.

Specified by:
  `clientLogDirectory` in interface `IgfsEx`
Parameters:
  `logDir` - Client file system log directory.

#### evictExclude

    public boolean evictExclude(IgfsPath path,
                       boolean primary)

Whether this path is excluded from evictions.

Specified by:
  `evictExclude` in interface `IgfsEx`
Parameters:
  `path` - Path.
  `primary` - Whether the mode is PRIMARY.
Returns:
  `True` if path is excluded from evictions.

#### nextAffinityKey

    public IgniteUuid nextAffinityKey()

Get next affinity key.

Specified by:
  `nextAffinityKey` in interface `IgfsEx`
Returns:
  Next affinity key.

#### isProxy

    public boolean isProxy(URI path)

Check whether the given path is proxy path.

Specified by:
  `isProxy` in interface `IgfsEx`
Parameters:
  `path` - Path.
Returns:
  `True` if proxy.

#### name

    public String name()

Gets IGFS name.

Specified by:
  `name` in interface `IgniteFileSystem`
Returns:
  IGFS name.

#### configuration

    public FileSystemConfiguration configuration()

Gets IGFS configuration.

Specified by:
  `configuration` in interface `IgniteFileSystem`
Returns:
  IGFS configuration.

#### summary

    public IgfsPathSummary summary(IgfsPath path)

Gets summary (total number of files, total number of directories and total length) for a given path.

Specified by:
  `summary` in interface `IgniteFileSystem`
Parameters:
  `path` - Path to get information for.
Returns:
  Summary object.

#### create

    public IgfsOutputStream create(IgfsPath path,
                          boolean overwrite)

Creates a file and opens it for writing.

Specified by:
  `create` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to create.
  `overwrite` - Overwrite file if it already exists. Note: you cannot overwrite an existent directory.
Returns:
  File output stream to write data to.

#### create

    public IgfsOutputStream create(IgfsPath path,
                          int bufSize,
                          boolean overwrite,
                          int replication,
                          long blockSize,
                          @Nullable
                          Map<String,String> props)

Creates a file and opens it for writing.

Specified by:
  `create` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to create.
  `bufSize` - Write buffer size (bytes) or `zero` to use default value.
  `overwrite` - Overwrite file if it already exists. Note: you cannot overwrite an existent directory.
  `replication` - Replication factor.
  `blockSize` - Block size.
  `props` - File properties to set.
Returns:
  File output stream to write data to.

#### create

    public IgfsOutputStream create(IgfsPath path,
                          int bufSize,
                          boolean overwrite,
                          @Nullable
                          IgniteUuid affKey,
                          int replication,
                          long blockSize,
                          @Nullable
                          Map<String,String> props)

Creates a file and opens it for writing.

Specified by:
  `create` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to create.
  `bufSize` - Write buffer size (bytes) or `zero` to use default value.
  `overwrite` - Overwrite file if it already exists. Note: you cannot overwrite an existent directory.
  `affKey` - Affinity key used to store file blocks. If not `null`, the whole file will be stored on node where `affKey` resides.
  `replication` - Replication factor.
  `blockSize` - Block size.
  `props` - File properties to set.
Returns:
  File output stream to write data to.

#### append

    public IgfsOutputStream append(IgfsPath path,
                          boolean create)

Opens an output stream to an existing file for appending data.

Specified by:
  `append` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to append.
  `create` - Create file if it doesn't exist yet.
Returns:
  File output stream to append data to.

#### append

    public IgfsOutputStream append(IgfsPath path,
                          int bufSize,
                          boolean create,
                          @Nullable
                          Map<String,String> props)

Opens an output stream to an existing file for appending data.

Specified by:
  `append` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to append.
  `bufSize` - Write buffer size (bytes) or `zero` to use default value.
  `create` - Create file if it doesn't exist yet.
  `props` - File properties to set only in case it file was just created.
Returns:
  File output stream to append data to.

#### setTimes

    public void setTimes(IgfsPath path,
                long modificationTime,
                long accessTime)

Sets last access time and last modification time for a given path. If argument is `null`, corresponding time will not be changed.

Specified by:
  `setTimes` in interface `IgniteFileSystem`
Parameters:
  `path` - Path to update.
  `modificationTime` - Optional last modification time to set. Value `-1` does not update modification time.
  `accessTime` - Optional last access time to set. Value `-1` does not update access time.

#### affinity

    public Collection<IgfsBlockLocation> affinity(IgfsPath path,
                                         long start,
                                         long len)

Gets affinity block locations for data blocks of the file, i.e. the nodes, on which the blocks are stored.

Specified by:
  `affinity` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to get affinity for.
  `start` - Position in the file to start affinity resolution from.
  `len` - Size of data in the file to resolve affinity for.
Returns:
  Affinity block locations.

#### affinity

    public Collection<IgfsBlockLocation> affinity(IgfsPath path,
                                         long start,
                                         long len,
                                         long maxLen)

Get affinity block locations for data blocks of the file. In case `maxLen` parameter is set and particular block location length is greater than this value, block locations will be split into smaller chunks.

Specified by:
  `affinity` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to get affinity for.
  `start` - Position in the file to start affinity resolution from.
  `len` - Size of data in the file to resolve affinity for.
  `maxLen` - Maximum length of a single returned block location length.
Returns:
  Affinity block locations.

#### metrics

    public IgfsMetrics metrics()

Gets metrics snapshot for this file system.

Specified by:
  `metrics` in interface `IgniteFileSystem`
Returns:
  Metrics.

#### resetMetrics

    public void resetMetrics()

Resets metrics for this file system.

Specified by:
  `resetMetrics` in interface `IgniteFileSystem`

#### size

    public long size(IgfsPath path)

Determines size of the file denoted by provided path. In case if path is a directory, then total size of all containing entries will be calculated recursively.

Specified by:
  `size` in interface `IgniteFileSystem`
Parameters:
  `path` - File system path.
Returns:
  Total size.

#### exists

    public boolean exists(IgfsPath path)

Checks if the specified path exists in the file system.

Specified by:
  `exists` in interface `IgniteFileSystem`
Parameters:
  `path` - Path to check for existence in the file system.
Returns:
  `True` if such file exists, otherwise - `false`.

#### update

    @Nullable
    public IgfsFile update(IgfsPath path,
                           Map<String,String> props)

Updates file information for the specified path. Existent properties, not listed in the passed collection, will not be affected. Other properties will be added or overwritten. Passed properties with `null` values will be removed from the stored properties or ignored if they don't exist in the file info.

When working in `DUAL_SYNC` or `DUAL_ASYNC` modes with Hadoop secondary file system only the following properties will be updated:

- `usrName` - file owner name;
- `grpName` - file owner group;
- `permission` - Unix-style string representing file permissions.

Specified by:
  `update` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to set properties for.
  `props` - Properties to update.
Returns:
  File information for specified path or `null` if such path does not exist.

#### rename

    public void rename(IgfsPath src,
              IgfsPath dest)

Renames/moves a file.

You are free to rename/move data files as you wish, but directories can be only renamed. You cannot move the directory between different parent directories.

Examples:

- "/work/file.txt" => "/home/project/Presentation Scenario.txt"
- "/work" => "/work-2012.bkp"
- "/work" => "/backups/work" - such operation is restricted for directories.

Specified by:
  `rename` in interface `IgniteFileSystem`
Parameters:
  `src` - Source file path to rename.
  `dest` - Destination file path. If destination path is a directory, then source file will be placed into destination directory with original name.

#### delete

    public boolean delete(IgfsPath path,
                 boolean recursive)

Deletes file.

Specified by:
  `delete` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to delete.
  `recursive` - Delete non-empty directories recursively.
Returns:
  `True` in case of success, `false` otherwise.

#### mkdirs

    public void mkdirs(IgfsPath path)

Creates directories under specified path.

Specified by:
  `mkdirs` in interface `IgniteFileSystem`
Parameters:
  `path` - Path of directories chain to create.

#### mkdirs

    public void mkdirs(IgfsPath path,
              @Nullable
              Map<String,String> props)

Creates directories under specified path with the specified properties. Note that the properties are applied only to created directories, but never updated for existing ones.

Specified by:
  `mkdirs` in interface `IgniteFileSystem`
Parameters:
  `path` - Path of directories chain to create.
  `props` - Metadata properties to set on created directories.

#### listPaths

    public Collection<IgfsPath> listPaths(IgfsPath path)

Lists file paths under the specified path.

Specified by:
  `listPaths` in interface `IgniteFileSystem`
Parameters:
  `path` - Path to list files under.
Returns:
  List of paths under the specified path.

#### listFiles

    public Collection<IgfsFile> listFiles(IgfsPath path)

Lists files under the specified path.

Specified by:
  `listFiles` in interface `IgniteFileSystem`
Parameters:
  `path` - Path to list files under.
Returns:
  List of files under the specified path.

#### info

    @Nullable
    public IgfsFile info(IgfsPath path)

Gets file information for the specified path.

Specified by:
  `info` in interface `IgniteFileSystem`
Parameters:
  `path` - Path to get information for.
Returns:
  File information for specified path or `null` if such path does not exist.

#### mode

    public IgfsMode mode(IgfsPath path)

Get mode for the given path.

Specified by:
  `mode` in interface `IgniteFileSystem`
Parameters:
  `path` - Path.
Returns:
  Mode used for this path.

#### usedSpaceSize

    public long usedSpaceSize()

Gets used space in bytes.

Specified by:
  `usedSpaceSize` in interface `IgniteFileSystem`
Returns:
  Used space in bytes.

#### asSecondary

    public IgfsSecondaryFileSystem asSecondary()

Return the given IGFS as a secondary file system.

Specified by:
  `asSecondary` in interface `IgfsEx`
Returns:
  Secondary file system wrapper.

#### await

    public void await(IgfsPath... paths)

Await for any pending finished writes on the children paths.

Specified by:
  `await` in interface `IgfsEx`
Parameters:
  `paths` - Paths to check.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017