fs

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Path string `json:"path"`
	Name string `json:"name"`

	Size      int64     `json:"size"`
	Timestamp time.Time `json:"timestamp"`
}

type FileSystem

type FileSystem struct {
	// contains filtered or unexported fields
}

func New

func New(root string) *FileSystem

func (*FileSystem) CreateDir

func (fs *FileSystem) CreateDir(path string) error

func (*FileSystem) CreateFile

func (fs *FileSystem) CreateFile(path, content string) error

func (*FileSystem) DeleteDir

func (fs *FileSystem) DeleteDir(path string) error

func (*FileSystem) DeleteFile

func (fs *FileSystem) DeleteFile(path string) error

func (*FileSystem) ListFiles

func (fs *FileSystem) ListFiles() ([]FileInfo, error)

func (*FileSystem) ReadFile

func (fs *FileSystem) ReadFile(path string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL