Documentation ¶
Index ¶
- func Abs(path string) (dir string)
- func AbsBase(path string) (dir string)
- func BytesToBase64(input []byte) string
- func CacheBytes(path string) []byte
- func CacheFile(path string) string
- func Cat(pInputString ...string) string
- func CatArray(input []string) string
- func CatArrayPad(pStrArray []string, pad string) string
- func CatPath(input ...string) string
- func CharIsNumber(input string) bool
- func CheckDateString(input string) string
- func ConvertTransient(pInput string) string
- func DirectoryExists(path string) bool
- func FileExists(path string) bool
- func FromBase64(input string) []byte
- func FromBase64e(input string) ([]byte, error)
- func FromUBase64(input string) string
- func GetDirectory(path string) string
- func GetDirectoryE(path string) (string, error)
- func GetMediaFile(path string) (tag.Metadata, error)
- func IIF(condition bool, onTrue string, onFalse string) string
- func Insert(slice []int, index, value int) []int
- func IsMediaFile(path string) bool
- func MultiReplace(input string, replace string, find ...string) string
- func OSSlash(path string) string
- func PathExists(path string) bool
- func Sha1String(pStrData string) string
- func Space2Dash(text string) string
- func StrInt64(pStrInput string) int64
- func StrTransformLiteral(text string) (str string)
- func StripFileExtension(path string) string
- func StripFileExtensionC(condition bool, path string) string
- func ToBase64(input string) string
- func ToUBase64(input string) string
- func Touch(path string) bool
- func Trim(separator string, text ...string) []string
- func TrimJoin(separator string, text ...string) string
- func TrimUnixSlash(text string) string
- func TrimUnixSlashLeft(text string) string
- func TrimUnixSlashRight(text string) string
- func UnixSlash(path string) string
- func WReap(separator string, text ...string) string
- func WReapLeft(separator string, text ...string) string
- func WReapRight(separator string, text ...string) string
- func Wrap(wrap string, text string) string
- func WrapLeft(separator string, text string) string
- func WrapRight(separator string, text string) string
- func Wrapper(separator string, text ...string) string
- func WrapperLeft(separator string, text ...string) string
- func WrapperRight(separator string, text ...string) string
- type FileTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsBase ¶
AbsBase returns `filepath.Base(path)` after converting to absolute representation of path; Ignores errors.
func CacheBytes ¶
CacheBytes Loads a local file in to `[]bytes`.
func Cat ¶
Cat - Concatenate a string by way of writing input to a buffer and converting returning its .WriteString() function.
func CatArrayPad ¶
CatArrayPad - Concatenate a string were padding the buffer here with a single char.
func CharIsNumber ¶
CharIsNumber checks wether input string contains all digit characters.
func CheckDateString ¶
CheckDateString checks the beginning of a file-name for an 8-digit date-string; I.E.: `YYYYMMDD`
func ConvertTransient ¶
ConvertTransient What does this actually do?
func DirectoryExists ¶
DirectoryExists checks if a given Directory exists.
func FileExists ¶
FileExists checks if a given path or file exists.
func FromBase64 ¶
FromBase64 gets base-64 StdEncoding; ignores error.
func FromBase64e ¶
FromBase64e gets base-64 StdEncoding (with error)
func GetDirectory ¶
GetDirectory expects a file as input and returns its parent directory. if input is a directory, I'm wondering what happens.
WARNING: **THIS FILE RETURNS A EMPTY STRING ON ERROR!** use `filepath.Dir` or `util.GetDirectoryE`!
func GetDirectoryE ¶
GetDirectoryE expects a file as input and returns its parent directory. if input is a directory, I'm wondering what happens.
func Insert ¶
Insert inserts the value into the slice at the specified index, which must be in range. The slice must have room for the new element.
func IsMediaFile ¶
func MultiReplace ¶
MultiReplace converts whatever to whatever. This is used to convert, for example, various characters (`find`) to a dash.
func OSSlash ¶
OSSlash converts all backslash to forward-slash (if OS is not windows). It'd probably be best to just use your standard `fileutil.Abs(…)`.
func PathExists ¶
PathExists checks if a given File or Directory exists.
func Space2Dash ¶
Space2Dash converts or replaces all spaces in a string with a small-dash.
func StrTransformLiteral ¶
StrTransformLiteral takes a literal string stuff like `EOL` and asserts literal code(s) such as `\n` and takes a measure or two to clean up the string to something a bit more normative. You might say, this makes a string suitable *from* JSON value ---might not aside from char-codes.
func StripFileExtensionC ¶
StripFileExtensionC ...yep.
func Touch ¶
Touch will create a file if it does not exist returns success. Bare in mind if the file exists before calling, then this will return false.
func Trim ¶
Trim trims each text element in the input array. TODO: should we act on `text` itself or return a new value?
func TrimJoin ¶
TrimJoin trims each text element in the input array and `Join`s the result (using separator). TODO: should we act on `text` itself or return a new value?
func TrimUnixSlash ¶
TrimUnixSlash trims left and right forward-slashes from input string.
func TrimUnixSlashLeft ¶
TrimUnixSlashLeft trims leftmost forward-slash from input string.
func TrimUnixSlashRight ¶
TrimUnixSlashRight trims right forward-slash from input string.
func WReap ¶
WReap makes sure that each text node is trimmed of `separator` and also wraps text with the `separator`.
func WReapLeft ¶
WReapLeft makes sure that each text node is trimmed of `separator` and also left-wraps text with the `separator`.
func WReapRight ¶
WReapRight makes sure that each text node is trimmed of `separator` and also right-wraps text with the `separator`.
func Wrap ¶
Wrap wraps text with `wrap`, written for converting "v" to "/v/". see: https://blog.golang.org/strings
func WrapperLeft ¶
WrapperLeft concatenates text and wraps it like `Wrap` and pads it to the left with `sep`.
func WrapperRight ¶
WrapperRight concatenates text and wraps it like `Wrap` and pads it to the right with `sep`.