fsutil

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OSDriver

type OSDriver struct{}

OSDriver is the driver for a concrete file system.

func (OSDriver) MkdirAll

func (OSDriver) MkdirAll(dirname string) error

MkdirAll creates directories recursively or is a NOP when they already exist.

func (OSDriver) ReadDir

func (OSDriver) ReadDir(dirname string) ([]fs.FileInfo, error)

ReadDir lists names of files from dirname.

func (OSDriver) ReadFile

func (OSDriver) ReadFile(filename string) ([]byte, error)

ReadFile returns the content of filename. It always transforms CRLF newlines into LF only.

func (OSDriver) Stat

func (OSDriver) Stat(filename string) (fs.FileInfo, error)

Stat returns real information about a file.

func (OSDriver) Symlink(oldname, newname string) error

Symlink creates a symbolic link newname of oldname.

func (OSDriver) WriteFile

func (OSDriver) WriteFile(filename string, data []byte, perm os.FileMode) error

WriteFile writes data to filename atomically with permission perm.

Jump to

Keyboard shortcuts

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