Class PackFile

    • Constructor Detail

      • PackFile

        public PackFile​(File file)
        Create a PackFile for a pack or related file.
        Parameters:
        file - File pointing to the location of the file.
      • PackFile

        public PackFile​(File directory,
                        ObjectId id,
                        PackExt ext)
        Create a PackFile for a pack or related file.
        Parameters:
        directory - Directory to create the PackFile in.
        id - the ObjectId for this pack
        ext - the packExt of the name.
      • PackFile

        public PackFile​(File directory,
                        String id,
                        PackExt ext)
        Create a PackFile for a pack or related file.
        Parameters:
        directory - Directory to create the PackFile in.
        id - the id (40 Hex char) section of the pack name.
        ext - the packExt of the name.
      • PackFile

        public PackFile​(File directory,
                        String name)
        Create a PackFile for a pack or related file.
        Parameters:
        directory - Directory to create the PackFile in.
        name - Filename (last path section) of the PackFile
    • Method Detail

      • getId

        public String getId()
        Getter for the field id.
        Returns:
        the id (40 Hex char) section of the name.
      • getPackExt

        public PackExt getPackExt()
        Getter for the field packExt.
        Returns:
        the packExt of the name.
      • create

        public PackFile create​(PackExt ext)
        Create a new similar PackFile with the given extension instead.
        Parameters:
        ext - PackExt the extension to use.
        Returns:
        a PackFile instance with specified extension
      • createForDirectory

        public PackFile createForDirectory​(File directory)
        Create a new similar PackFile in the given directory.
        Parameters:
        directory - Directory to create the new PackFile in.
        Returns:
        a PackFile in the given directory
      • createPreservedForDirectory

        public PackFile createPreservedForDirectory​(File directory)
        Create a new similar preserved PackFile in the given directory.
        Parameters:
        directory - Directory to create the new PackFile in.
        Returns:
        a PackFile in the given directory with "old-" prefixing the extension