Class Checkout


  • public class Checkout
    extends java.lang.Object
    An object that can be used to check out many files.
    Since:
    6.6.1
    • Method Detail

      • setRecursiveDeletion

        public Checkout setRecursiveDeletion​(boolean recursive)
        Defines whether directories that are in the way of the file to be checked out shall be deleted recursively.
        Parameters:
        recursive - whether to delete such directories recursively
        Returns:
        this
      • safeCreateParentDirectory

        public void safeCreateParentDirectory​(java.lang.String gitPath,
                                              java.io.File parentDir,
                                              boolean makeSpace)
                                       throws java.io.IOException
        Ensure that the given parent directory exists, and cache the information that gitPath refers to a file.
        Parameters:
        gitPath - of the file to be written
        parentDir - directory in which the file shall be placed, assumed to be the parent of the gitPath
        makeSpace - whether to delete a possibly existing file at parentDir
        Throws:
        java.io.IOException - if the directory cannot be created, if necessary
      • checkoutGitlink

        public void checkoutGitlink​(DirCacheEntry entry,
                                    java.lang.String gitPath)
                             throws java.io.IOException
        Checks out the gitlink given by the DirCacheEntry.
        Parameters:
        entry - DirCacheEntry to check out
        gitPath - the git path of the entry, if known already; otherwise null and it's read from the entry itself
        Throws:
        java.io.IOException - if the gitlink cannot be checked out