Documentation
¶
Index ¶
- Constants
- Variables
- func Append(URL string, p []byte) error
- func Handle()
- func Log(msg ...interface{})
- func Mkdir(URL string) error
- func MustOpen(URL string) io.ReadCloser
- func Open(URL string) (io.ReadCloser, error)
- func Put(URL string, p []byte) error
- func Read(URL string) ([]byte, error)
- func ReadDir(URL string) ([]string, error)
- func Remove(URL string) error
- func SetWD(dir string)
- func Touch(URL string) error
- type WriteCloseFlusher
Constants ¶
View Source
const ( DirPerm = 0777 // permissions for new directory FilePerm = 0666 // permissions for new files )
View Source
const ( APPEND action = "append" LS action = "ls" MKDIR action = "mkdir" PUT action = "put" READ action = "read" RM action = "rm" )
View Source
const BUFSIZE = 16 * 1024 * 1024 // bufio buffer size
Variables ¶
View Source
var (
Logging = false // enables logging
)
Functions ¶
func Mkdir ¶
Creates the directory at specified URL (or local file), creating all needed parent directories as well.
func MustOpen ¶
func MustOpen(URL string) io.ReadCloser
Types ¶
type WriteCloseFlusher ¶
type WriteCloseFlusher interface {
io.WriteCloser
Flush() error
}
func Create ¶
func Create(URL string) (WriteCloseFlusher, error)
create a file for writing, clobbers previous content if any.
func MustCreate ¶
func MustCreate(URL string) WriteCloseFlusher
Click to show internal directories.
Click to hide internal directories.