Package play.libs

Class Files.DelegateTemporaryFile

    • Constructor Detail

      • DelegateTemporaryFile

        public DelegateTemporaryFile​(play.api.libs.Files.TemporaryFile temporaryFile)
    • Method Detail

      • moveFileTo

        @Deprecated
        public Path moveFileTo​(File to,
                               boolean replace)
        Deprecated.
        Description copied from interface: Files.TemporaryFile
        Move the file to the specified destination File. In some cases, the source and destination file may point to the same inode. See the documentation for Files.move(Path, Path, CopyOption...) to see more details.
        Specified by:
        moveFileTo in interface Files.TemporaryFile
        Parameters:
        to - the path to the destination file
        replace - true if an existing file should be replaced, false otherwise.
      • moveTo

        public Path moveTo​(File to,
                           boolean replace)
        Description copied from interface: Files.TemporaryFile
        Move the file to the specified destination File. In some cases, the source and destination file may point to the same inode. See the documentation for Files.move(Path, Path, CopyOption...) to see more details.
        Specified by:
        moveTo in interface Files.TemporaryFile
        Parameters:
        to - the path to the destination file
        replace - true if an existing file should be replaced, false otherwise.
      • copyTo

        public Path copyTo​(Path destination,
                           boolean replace)
        Description copied from interface: Files.TemporaryFile
        Copy the file to the specified path destination and, if the destination exists, decide if replace it based on the replace parameter.
        Specified by:
        copyTo in interface Files.TemporaryFile
        Parameters:
        destination - the path destination.
        replace - if it should replace an existing file.
      • atomicMoveFileWithFallback

        @Deprecated
        public Path atomicMoveFileWithFallback​(File to)
        Deprecated.
        Description copied from interface: Files.TemporaryFile
        Attempts to move source to target atomically and falls back to a non-atomic move if it fails.

        This always tries to replace existent files. Since it is platform dependent if atomic moves replaces existent files or not, considering that it will always replaces, makes the API more predictable.

        Specified by:
        atomicMoveFileWithFallback in interface Files.TemporaryFile
        Parameters:
        to - the path to the destination file
      • atomicMoveWithFallback

        public Path atomicMoveWithFallback​(File to)
        Description copied from interface: Files.TemporaryFile
        Attempts to move source to target atomically and falls back to a non-atomic move if it fails.

        This always tries to replace existent files. Since it is platform dependent if atomic moves replaces existent files or not, considering that it will always replaces, makes the API more predictable.

        Specified by:
        atomicMoveWithFallback in interface Files.TemporaryFile
        Parameters:
        to - the path to the destination file