Class GridFileUtils


  • public class GridFileUtils
    extends Object
    General files manipulation utilities.
    • 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.