Interface DuplicatingFileSystem


  • public interface DuplicatingFileSystem
    An extension interface for FileSystems that can perform cheap DFS side duplicate operation. Such an operation can improve the time required for creating cheaply independent snapshots from incremental snapshots.
    • Method Detail

      • canFastDuplicate

        boolean canFastDuplicate​(Path source,
                                 Path destination)
                          throws IOException
        Tells if we can perform duplicate/copy between given paths.

        This should be a rather cheap operation, preferably not involving any remote accesses. You can check e.g. if both paths are on the same host.

        Parameters:
        source - The path of the source file to duplicate
        destination - The path where to duplicate the source file
        Returns:
        true, if we can perform the duplication
        Throws:
        IOException