Documentation ¶
Index ¶
- func CopyFile(dstFs FileSystem, dst string, srcFs FileSystem, src string, mode os.FileMode) (int64, error)
- func Exists(fs FileSystem, path string) (bool, error)
- func OsCopyFile(dst, src string, mode os.FileMode) (int64, error)
- func OsExists(path string) (bool, error)
- func OsWriteFile(filename string, data []byte) error
- func WriteFile(fs FileSystem, filename string, data []byte) error
- type File
- type FileExt
- type FileSystem
- type FileSystemExt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶
func CopyFile(dstFs FileSystem, dst string, srcFs FileSystem, src string, mode os.FileMode) (int64, error)
func Exists ¶
func Exists(fs FileSystem, path string) (bool, error)
Exists returns true if the path is existing
func OsCopyFile ¶
OsCopyFile will copy file content from src to dst TODO: if in *nix, use sendfile instead
func OsWriteFile ¶
Types ¶
type FileSystem ¶
FileSystem is the filesystem interface.
func MemoryFs ¶
func MemoryFs() FileSystem
MemoryFs create an in-memory file system, this is useful for static file serving in a http server
func PwdFs ¶
func PwdFs() (FileSystem, error)
PwdFs create a new file system base on current work directory
Click to show internal directories.
Click to hide internal directories.