Documentation ¶
Index ¶
- Constants
- Variables
- func CheckFileExisting(fileHash, fileName, savePath, encryptionTag string) bool
- func CheckFilePathEx(fileHash, fileName, savePath string) bool
- func CheckSliceExisting(fileHash, fileName, sliceHash, savePath string) bool
- func ClearFileMap(hash string)
- func DeleteDirectory(fileHash string)
- func DeleteSlice(sliceHash string) error
- func EscapePath(param []string) string
- func GetAllFiles(pathname string)
- func GetDownloadCsvPath(fileHash, fileName, savePath string) string
- func GetDownloadPath(fileName string) string
- func GetDownloadTmpPath(fileHash, fileName, savePath string) string
- func GetDumpySliceData(fileHash string, sliceNumber uint64) []byte
- func GetFileData(filePath string, offset *protos.SliceOffset) []byte
- func GetFileHash(filePath, encryptionTag string) string
- func GetFileInfo(filePath string) os.FileInfo
- func GetFilePath(hash string) string
- func GetFileSuffix(fileName string) string
- func GetSliceData(sliceHash string) []byte
- func GetSliceSize(sliceHash string) int64
- func GetVideoDuration(path string) (uint64, error)
- func GetVideoTmpFolder(fileHash string) string
- func GetWholeFileData(filePath string) []byte
- func IsFile(f string) (bool, error)
- func PathExists(path string) (bool, error)
- func RecordDownloadCSV(target *protos.RspFileStorageInfo)
- func SaveDownloadProgress(sliceHash, fileName, fileHash, savePath string)
- func SaveFileData(data []byte, offset int64, sliceHash, fileName, fileHash, savePath string) bool
- func SaveSliceData(data []byte, sliceHash string, offset uint64) bool
- func VideoToHls(fileHash string) bool
- type HlsInfo
Constants ¶
View Source
const HLS_HEADER_FILENAME = "index.m3u8"
View Source
const HLS_SEGMENT_FILENAME = "%d.ts"
View Source
const TEMP_FOLDER = "tmp"
Variables ¶
View Source
var HlsInfoMap = make(map[string]*HlsInfo)
Functions ¶
func CheckFileExisting ¶
CheckFileExisting
func CheckFilePathEx ¶
CheckFilePathEx
func CheckSliceExisting ¶
CheckSliceExisting
func GetAllFiles ¶
func GetAllFiles(pathname string)
GetAllFiles get all files in directory and all sub-directory recursively
func GetDownloadCsvPath ¶
GetDownloadCsvPath get download CSV path
func GetDownloadPath ¶
GetDownloadPath get download path
func GetDownloadTmpPath ¶
GetDownloadTmpPath get temporary download path
func GetDumpySliceData ¶
func GetVideoDuration ¶
func GetVideoTmpFolder ¶
func GetWholeFileData ¶
func RecordDownloadCSV ¶
func RecordDownloadCSV(target *protos.RspFileStorageInfo)
RecordDownloadCSV
func SaveDownloadProgress ¶
func SaveDownloadProgress(sliceHash, fileName, fileHash, savePath string)
SaveDownloadProgress
func SaveFileData ¶
SaveFileData
func SaveSliceData ¶
SaveSliceData
func VideoToHls ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.