Interface PathsCopyingFileSystem

    • Method Detail

      • canCopyPaths

        default boolean canCopyPaths​(Path source,
                                     Path destination)
                              throws IOException
        Description copied from interface: IFileSystem
        Tells if this FileSystem supports an optimised way to directly copy between given paths. In other words if it implements PathsCopyingFileSystem.

        At least one of, either source or destination belongs to this IFileSystem. One of them can point to the local file system. In other words this request can correspond to either: downloading a file from the remote file system, uploading a file to the remote file system or duplicating a file in the remote file system.

        Specified by:
        canCopyPaths in interface IFileSystem
        Parameters:
        source - The path of the source file to duplicate
        destination - The path where to duplicate the source file
        Returns:
        true, if this IFileSystem can perform this operation more quickly compared to the generic code path of using streams.
        Throws:
        IOException