storage

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage represents a storage.

func NewStorage

func NewStorage(base string, defaultPermissions os.FileMode) *Storage

NewStorage creates a new storage.

func (*Storage) CreateDirectory

func (storage *Storage) CreateDirectory(targetPath string) error

CreateDirectory creates the directory.

func (*Storage) CreateFile

func (storage *Storage) CreateFile(targetPath string) error

CreateFile creates the file.

func (*Storage) DirectoryExists

func (storage *Storage) DirectoryExists(targetPath string) bool

DirectoryExists returns true if the directory exists.

func (*Storage) FileExists

func (storage *Storage) FileExists(targetPath string) bool

FileExists returns true if the file exists.

func (*Storage) GetBase

func (storage *Storage) GetBase() string

GetBase returns the base path of the storage.

func (*Storage) GetDefaultPermissions

func (storage *Storage) GetDefaultPermissions() os.FileMode

GetDefaultPermissions returns the default permissions for new files.

func (*Storage) GetPath

func (storage *Storage) GetPath(targetPath string) string

GetPath returns the path of the target path.

func (*Storage) OpenFile

func (storage *Storage) OpenFile(targetPath string) (*os.File, error)

OpenFile opens the file.

Jump to

Keyboard shortcuts

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