Documentation
¶
Index ¶
- Constants
- type LocalStorage
- func (s *LocalStorage) Append(path, data string) bool
- func (s *LocalStorage) Copy(from, to string) bool
- func (s *LocalStorage) Delete(path string) bool
- func (s *LocalStorage) DeleteDir(dir string) bool
- func (s *LocalStorage) Exists(path string) bool
- func (s *LocalStorage) Get(path string) ([]byte, error)
- func (s *LocalStorage) LastModified(path string) time.Time
- func (s *LocalStorage) MakeDir(dir string) bool
- func (s *LocalStorage) Move(from, to string) bool
- func (s *LocalStorage) Path(path string) string
- func (s *LocalStorage) Put(path, contents string, options ...interface{}) bool
- func (s *LocalStorage) PutData(path string, contents []byte) bool
- func (s *LocalStorage) PutFile(path string, fileSource *os.File, options ...interface{}) bool
- func (s *LocalStorage) Size(path string) int64
- func (s *LocalStorage) Url(path string) string
Constants ¶
View Source
const (
Type = storage.Type("local")
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalStorage ¶
type LocalStorage struct {
BaseDir string
}
func (*LocalStorage) Append ¶
func (s *LocalStorage) Append(path, data string) bool
func (*LocalStorage) Copy ¶
func (s *LocalStorage) Copy(from, to string) bool
func (*LocalStorage) Delete ¶
func (s *LocalStorage) Delete(path string) bool
func (*LocalStorage) DeleteDir ¶
func (s *LocalStorage) DeleteDir(dir string) bool
func (*LocalStorage) Exists ¶
func (s *LocalStorage) Exists(path string) bool
func (*LocalStorage) LastModified ¶
func (s *LocalStorage) LastModified(path string) time.Time
func (*LocalStorage) MakeDir ¶
func (s *LocalStorage) MakeDir(dir string) bool
func (*LocalStorage) Move ¶
func (s *LocalStorage) Move(from, to string) bool
func (*LocalStorage) Path ¶
func (s *LocalStorage) Path(path string) string
Path Create file by content
func (*LocalStorage) Put ¶
func (s *LocalStorage) Put(path, contents string, options ...interface{}) bool
Put Create file by content
func (*LocalStorage) PutData ¶
func (s *LocalStorage) PutData(path string, contents []byte) bool
PutData Create file by content
func (*LocalStorage) PutFile ¶
func (s *LocalStorage) PutFile(path string, fileSource *os.File, options ...interface{}) bool
func (*LocalStorage) Size ¶
func (s *LocalStorage) Size(path string) int64
func (*LocalStorage) Url ¶
func (s *LocalStorage) Url(path string) string
Url Get public URL of an object via path
Click to show internal directories.
Click to hide internal directories.