Documentation ¶
Index ¶
Constants ¶
View Source
const (
EmptyString = ""
)
Variables ¶
This section is empty.
Functions ¶
func FileSizeString ¶
func GetChecksumSHA256 ¶
GetChecksumSHA256 takes an absolute path (`ap`) to a file as a string and returns the SHA-256 checksum of the file content as a base64 encoded string. It opens the file, calculates the checksum by reading the file content, then base64 encodes the checksum and returns it along with any error encountered during the process. If an error occurs at any step (like during file opening, reading, or closing), it returns the error and an empty checksum string.
Types ¶
type FileObj ¶
type FileObj struct { OriginPath string OriginDir string Base string RelRoot string AbsPath string FileSize int64 ChecksumSHA256 string FName string FPseudoP string TagsMap map[string]string Ignore bool IgnoreString string IsDirectoryPart bool IsFailed bool IsFailedString string IsUploaded bool Group int // contains filtered or unexported fields }
func NewFileObj ¶
type FileObjList ¶
type FileObjList []*FileObj
func NewFileObjList ¶
func (FileObjList) GetStats ¶
func (fol FileObjList) GetStats() (stats Stats)
func (FileObjList) MaxGroup ¶
func (fol FileObjList) MaxGroup() (max int)
func (FileObjList) Values ¶
func (fol FileObjList) Values()
type RootList ¶
type RootList []FileObjList
RootList is a list of FileObjLists. When you call NewRootList and specify a list of paths, it determines all the subdirectories of those paths and creates a FileObjList for each subdirectory.
Click to show internal directories.
Click to hide internal directories.