Documentation ¶
Index ¶
- Constants
- func CreateDir(folderName string, dirPath string)
- func DeleteFile(name string)
- func FileExists(name string) bool
- func FileIntegrityCheck(hashFunc string, path string, expected string) bool
- func GenHash(s string, threadCount int) string
- func GetFormattedSize(size float64) string
- func SegmentFilePath(session string, fileID int) string
- func TempDirectory(session string) string
Constants ¶
View Source
const ( MemUnit = 1024 SHA256Algorithm = "sha256" MD5Algorithm = "md5" )
Variables ¶
This section is empty.
Functions ¶
func DeleteFile ¶
func DeleteFile(name string)
func FileExists ¶
func FileIntegrityCheck ¶
func GetFormattedSize ¶
func SegmentFilePath ¶
* Segments are stored in side the temproary directory above, * there are n segments, n represents threadcount. if thread = 10 * there will be 10 segments in the temp folder.
func TempDirectory ¶
Create a directory with session ID, Session ID is hash of URL and threadcount.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.