Documentation ¶
Overview ¶
Package sqlfs provides an SQL based filesystem
Index ¶
- func New(s *Storage) (billy.Filesystem, error)
- type Event
- type EventType
- type File
- func (f *File) Close() error
- func (f *File) Content() []byte
- func (f *File) Duplicate(filename string, mode os.FileMode, flag int, modTime time.Time) billy.File
- func (f *File) Flag() int
- func (f *File) Lock() error
- func (f *File) ModTime() time.Time
- func (f *File) Mode() os.FileMode
- func (f *File) Name() string
- func (f *File) Path() string
- func (f *File) Read(b []byte) (int, error)
- func (f *File) ReadAt(b []byte, off int64) (int, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Truncate(size int64) error
- func (f *File) Unlock() error
- func (f *File) Write(p []byte) (int, error)
- type FileInfo
- type FileInitializer
- type Handler
- type NoOpHandler
- type Storage
- func (s *Storage) Children(path string) ([]*File, error)
- func (s *Storage) Get(path string) (*File, error)
- func (s *Storage) Handle(pattern string, handler Handler)
- func (s *Storage) Has(path string) bool
- func (s *Storage) New(path string, mode os.FileMode, flag int) (*File, error)
- func (s *Storage) Remove(path string) error
- func (s *Storage) Rename(fromPath, toPath string) error
- func (s *Storage) Write(path string, content []byte) error
- type Storer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents a file.
type FileInfo ¶
type FileInfo struct {
// contains filtered or unexported fields
}
FileInfo implements os.FileInfo
type FileInitializer ¶
FileInitializer creates a new file for given path, data...
type NoOpHandler ¶
type NoOpHandler struct{}
NoOpHandler provides a no operation handler
func (NoOpHandler) Handle ¶
func (h NoOpHandler) Handle(*Event)
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
NewStorage creates a new Storage for given Storer
type Storer ¶
type Storer interface { // Initialize initializes the storer Initialize() error // Has checks whether or not given path exists Has(path string) bool // Create creates a new path with given mode and flag Create(f *File) error // Children returns the children of given path Children(fn FileInitializer, path, separator string) ([]*File, error) // Get returns the file on given path Get(fn FileInitializer, path string) (*File, error) // Rename renames file Rename(fromPath, toPath string) error // Remove removes file or directory on given path Remove(path string) error // Write writes file content to file in given path Write(path string, content []byte) error // Lock locks the file like e.g. flock. It protects against access from // other processes. Lock(path string) error // Unlock unlocks the file. Unlock(path string) error }
Storer provides SQLite filesystem storer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.