Documentation ¶
Index ¶
- func HttpFileSystem(fs FileSystem, key ...string) http.FileSystem
- type CacheFileCreateParams
- type CacheFileOpenParams
- type CreateParams
- type File
- type FileCache
- type FileId
- type FileInfo
- type FileInfoStruct
- type FileSystem
- type GetCacheValueParams
- type MkdirParams
- type PutBoolParams
- type PutStringParams
- type ReadParams
- type ReadReturnParams
- type ReaddirParams
- type RegularFile
- type RenameParams
- type SeekParams
- type WriteParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpFileSystem ¶
func HttpFileSystem(fs FileSystem, key ...string) http.FileSystem
Types ¶
type File ¶
type File interface { RegularFile Cache() FileCache }
A File is a RegularFile with cache support and is returned by a FileSystem's Open method.
type FileCache ¶
type FileInfoStruct ¶
type FileSystem ¶
type FileSystem interface { Open(id string) (File, error) Create(parentId string, name string, flag int) (File, error) Mkdir(parentId string, name string, perm os.FileMode) (string, error) RemoveAll(id string) error Rename(oldId, newParentId string, newName string) (string, error) Stat(id string) (FileInfo, error) }
A FileSystem implements access to a collection of named files. The elements in a file path are separated by slash ('/', U+002F) characters, regardless of host operating system convention.
type RegularFile ¶
type RegularFile interface { Id() string ParentId() string io.Reader io.Writer io.Closer io.Seeker Sync() error Stat() (FileInfo, error) Readdir(count int) ([]FileInfo, error) }
A RegularFile represents an open file descriptor. The methods should behave the same as those on an *os.File.
Click to show internal directories.
Click to hide internal directories.