org.apache.ignite.igfs

## Interface IgfsFile

All Known Implementing Classes:
  IgfsFileImpl

    public interface IgfsFile

`IGFS` file or directory descriptor. For example, to get information about a file you would use the following code:

         IgfsPath filePath = new IgfsPath("my/working/dir", "file.txt");

         // Get metadata about file.
         IgfsFile file = igfs.info(filePath);

### Method Summary

Methods
`long` `accessTime()` Gets file last access time.
`int` `blockSize()` Gets file's data block size.
`long` `groupBlockSize()` Gets file group block size (i.e. block size * group size).
`boolean` `isDirectory()` Check this file is a directory.
`boolean` `isFile()` Check this file is a data file.
`long` `length()` Gets file's length.
`long` `modificationTime()` Gets file last modification time.
`IgfsPath` `path()` Gets path to file.
`Map<String,String>` `properties()` Get properties of the file.
`String` `property(String name)` Get file's property for specified name.
`String` `property(String name, String dfltVal)` Get file's property for specified name.

### Method Detail

#### path

    IgfsPath path()

Gets path to file.

Returns:
  Path to file.

#### isFile

    boolean isFile()

Check this file is a data file.

Returns:
  `True` if this is a data file.

#### isDirectory

    boolean isDirectory()

Check this file is a directory.

Returns:
  `True` if this is a directory.

#### length

    long length()

Gets file's length.

Returns:
  File's length or `zero` for directories.

#### blockSize

    int blockSize()

Gets file's data block size.

Returns:
  File's data block size or `zero` for directories.

#### groupBlockSize

    long groupBlockSize()

Gets file group block size (i.e. block size * group size).

Returns:
  File group block size.

#### accessTime

    long accessTime()

Gets file last access time. File last access time is not updated automatically due to performance considerations and can be updated on demand with `IgniteFileSystem.setTimes(IgfsPath, long, long)` method.

By default last access time equals file creation time.

Returns:
  Last access time.

#### modificationTime

    long modificationTime()

Gets file last modification time. File modification time is updated automatically on each file write and append.

Returns:
  Last modification time.

#### property

    String property(String name)
                    throws IllegalArgumentException

Get file's property for specified name.

Parameters:
  `name` - Name of the property.
Returns:
  File's property for specified name.
Throws:
  `IllegalArgumentException` - If requested property was not found.

#### property

    @Nullable
    String property(String name,
                           @Nullable
                           String dfltVal)

Get file's property for specified name.

Parameters:
  `name` - Name of the property.
  `dfltVal` - Default value if requested property was not found.
Returns:
  File's property for specified name.

#### properties

    Map<String,String> properties()

Get properties of the file.

Returns:
  Properties of the file.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0
Release Date | : March 31 2015