Documentation ¶
Index ¶
- func CtxCopy(ctx context.Context, dst io.Writer, src io.Reader) (written int64, err error)
- func CtxCopyN(ctx context.Context, dst io.Writer, src io.Reader, n int64) (written int64, err error)
- func EnsureFolder(path string) error
- func IsIgnoredFile(file string) bool
- func IsRegularFile(path string) (bool, error)
- func PathExists(path string) (bool, error)
- func SanitizeMimeType(mime string) string
- func SanitizePath(path string) string
- type CtxReader
- type CtxWriter
- type HttpRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureFolder ¶
EnsureFolder creates a folder if it doesn't exist already
func IsIgnoredFile ¶ added in v0.2.1
IsIgnoredFile returns true if the file should be ignored and not added to the repository Ignored files include OS metadata files etc
func IsRegularFile ¶
IsRegularFile returns true if the path is a file
func PathExists ¶
PathExists returns true if the path exists on disk
func SanitizeMimeType ¶ added in v0.3.0
SanitizeMimeType sanitizes a mime type
func SanitizePath ¶ added in v0.2.0
SanitizePath removes certain problematic characters from path names
Types ¶
type CtxReader ¶ added in v0.5.0
func ReaderFuncWithContext ¶ added in v0.4.1
ReaderFuncWithContext returns a stream reader that supports a context
Click to show internal directories.
Click to hide internal directories.