Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IStorage ¶
type IStorage interface {
// Put Create a file with content string
Put(path, contents string, options ...interface{}) bool
// PutFile Create a file from another file source
PutFile(path string, fileSource *os.File, options ...interface{}) bool
// Delete Remove a file
Delete(path string) bool
// Copy Clone file to another location
Copy(from, to string) bool
// Move Switch file location to new place
Move(from, to string) bool
// Exists Check existed file
Exists(path string) bool
// Get Receive a file content
Get(path string) ([]byte, error)
// Size Get file size
Size(path string) int64
// LastModified Obtains last modified of file
LastModified(path string) time.Time
// Url Absolute URL (Public URL)
Url(path string) string
// MakeDir Create new directory
MakeDir(dir string) bool
// DeleteDir Remove empty directory
DeleteDir(dir string) bool
// Append Add string content to bottom file
Append(path, data string) bool
}
IStorage Storage interface
Click to show internal directories.
Click to hide internal directories.