fs

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExist

func FileExist(path string) bool

Types

type FileSystem

type FileSystem interface {
	ReadFile(path string) ([]byte, error)
	WriteFile(path string, content []byte) error
}

type FileSystemManager

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

func NewFileSystemManager

func NewFileSystemManager(fs FileSystem) *FileSystemManager

func (FileSystemManager) CreateFile

func (manager FileSystemManager) CreateFile(path string, content []byte) error

func (FileSystemManager) ReadFile

func (manager FileSystemManager) ReadFile(path string) ([]byte, error)

type LocalFS

type LocalFS struct{}

* TL;DR: Working with local file. *

func (LocalFS) ReadFile

func (fs LocalFS) ReadFile(path string) ([]byte, error)

func (LocalFS) WriteFile

func (fs LocalFS) WriteFile(path string, content []byte) error

Jump to

Keyboard shortcuts

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