Documentation ¶
Index ¶
- func EnsureDirExists(dir string) (bool, error)
- func FindIP(iface net.Interface) (string, error)
- func GetAddress(cfg *config.Config) (string, error)
- func GetRandomURLPath() string
- func GetSessionID() (string, error)
- func HumanReadableSizeOf(pathToFile string) string
- func ReadFilenames(dir string) []string
- func ShouldBeZipped(args []string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAddress ¶
GetAddress returns the address of the network interface to bind the server to. The first time is run it prompts a dialog to choose which network interface should be used for the transfer
func GetRandomURLPath ¶
func GetRandomURLPath() string
GetRandomURLPath returns a random string of 4 alphanumeric characters
func GetSessionID ¶
GetSessionID returns a base64 encoded string of 40 random characters
func HumanReadableSizeOf ¶
HumanReadableSizeOf returns size of the file in human-readable form
func ShouldBeZipped ¶
ShouldBeZipped returns a boolean value indicating if the content should be zipped or not, and an error. The content should be zipped if: 1. the user passed the `-zip` flag 2. there are more than one file 3. the file is a directory
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.