Versions in this module Expand all Collapse all v0 v0.1.2 Nov 19, 2024 v0.1.0 Nov 19, 2024 Changes in this version + const TypeImage + var Avif = FileType + var Gif = FileType + var Heic = FileType + var Jpeg = FileType + var Png = FileType + func AppendOrCreateFile(filePath string, content []byte) error + func ConvertFileSizeMB(size int64) float64 + func CreateAndOpenFile(filePath string) (file *os.File, err error) + func DetectTypeByBytes(bytes []byte) string + func DetectTypeByFile[T *os.File | *multipart.FileHeader](file T) string + func DirTree(dir string, result *[]FileNode) error + func ScanCodeToTxT(absPath string, ext string) + func Tail(filename string, n uint64) (buff []string, err error) + type FileNode struct + Children []FileNode + FileName string + FilePath string + type FileSize int + const GB + const KB + const MB + func (fs FileSize) Int() int + func (fs FileSize) Int64() int64 + type FileType struct + ContentType string + Suffix string + func New(contentType string) FileType