Package org.apache.ignite.internal.util.io

## Class GridFileUtils

- java.lang.Object
- - org.apache.ignite.internal.util.io.GridFileUtils

    public class GridFileUtils
    extends Object

General files manipulation utilities.

### Constructor Summary

Constructors
`GridFileUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `copy​(FileIOFactory srcFactory, File src, FileIOFactory dstFactory, File dst, long maxBytes)` Copy file
`static void` `copy​(FileIO src, FileIO dst, long maxBytes)` Copy file
`static void` `ensureHardLinkAvailable​(Path path1, Path path2)` Checks that creating hard links between given paths is available.

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

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

### Constructor Detail

#### GridFileUtils

    public GridFileUtils()

### Method Detail

#### copy

    public static void copy​(FileIO src,
                            FileIO dst,
                            long maxBytes)
                     throws IOException

Copy file

Parameters:
  `src` - Source.
  `dst` - Dst.
  `maxBytes` - Max bytes.
Throws:
  `IOException`

#### copy

    public static void copy​(FileIOFactory srcFactory,
                            File src,
                            FileIOFactory dstFactory,
                            File dst,
                            long maxBytes)
                     throws IOException

Copy file

Parameters:
  `srcFactory` - Source factory.
  `src` - Source.
  `dstFactory` - Dst factory.
  `dst` - Dst.
  `maxBytes` - Max bytes.
Throws:
  `IOException`

#### ensureHardLinkAvailable

    public static void ensureHardLinkAvailable​(Path path1,
                                               Path path2)
                                        throws IgniteCheckedException

Checks that creating hard links between given paths is available.

Parameters:
  `path1` - The first path.
  `path2` - The second path.
Throws:
  `IgniteCheckedException` - If creating hard links is not available.