Documentation
¶
Overview ¶
Package helpers contains few helpers functions which are used throughout the project
Index ¶
- Constants
- func AbsolutePath(path, relativeRoot string) string
- func Copy(src, dst string) error
- func GuessTrackNumber(trackFilePath string) int64
- func ProjectRoot() (rootPath string, err error)
- func ProjectUserPath() (string, error)
- func RemovePidFile(PidFile string)
- func SetLogsFile(logFilePath string) error
- func SetUpPidFile(PidFile string)
Constants ¶
const HttpmsDir = ".httpms"
HttpmsDir is the name of the HTTPMS directory in the user's home directory
Variables ¶
This section is empty.
Functions ¶
func AbsolutePath ¶
AbsolutePath returns absolute path. If path is already absolute leave it be. If not join it with relativeRoot
func GuessTrackNumber ¶ added in v1.0.4
GuessTrackNumber will use the file name of a particular media file to decide what its track number should be. This may be useful when the media file is missing this information in the meta data but the order is clearly marked in the file name. The function tries a few examples found by scanning real files found in the wild.
func ProjectRoot ¶
ProjectRoot returns the source root directory. This function is useful only for tests which seek to find test files relative to the root of the repository.
func ProjectUserPath ¶
ProjectUserPath returns the directory in which user files should be stored. Creates it is missing. User files are thing such as sqlite files, logfiles and user configs.
func RemovePidFile ¶
func RemovePidFile(PidFile string)
RemovePidFile just removes the pidFile. The argument should be file path.
func SetLogsFile ¶
SetLogsFile sets the logfile of the server
func SetUpPidFile ¶
func SetUpPidFile(PidFile string)
SetUpPidFile will create the pidfile and it will contain the processid of the current process
Types ¶
This section is empty.