fs

package
v0.0.0-...-8ac10f7 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrSrcNotExist src file doesnt exist
	ErrSrcNotExist = errors.New("Source file does not exist")

	//ErrSrcNotRegularFile src file is not a regular file
	ErrSrcNotRegularFile = errors.New("Source file is not a regular file")

	//ErrDstNotRegularFile dst file is not a regular file
	ErrDstNotRegularFile = errors.New("Destination file is not a regular file")
)

Functions

This section is empty.

Types

type Fs

type Fs struct{}

Fs is a static class that provides Filesystem type functions

func NewFs

func NewFs() *Fs

NewFs generates a Fs object

func (*Fs) AppendSlash

func (fs *Fs) AppendSlash(path string) string

AppendSlash appends a slash to a path if one is needed

func (*Fs) CopyFile

func (fs *Fs) CopyFile(src string, dst string) error

CopyFile copies the contents of the src file to the dst file

func (*Fs) CopyFileEx

func (fs *Fs) CopyFileEx(src string, dst string, mode os.FileMode) error

CopyFileEx copies the contents of the src file to the dst file

func (*Fs) DoesFileExist

func (fs *Fs) DoesFileExist(fullpath string) bool

DoesFileExist just like it sounds

func (*Fs) GetFilenameFromURIOrFullPath

func (fs *Fs) GetFilenameFromURIOrFullPath(path string) string

GetFilenameFromURIOrFullPath retrieves the filename from an URI

func (*Fs) GetFullExePath

func (fs *Fs) GetFullExePath() (string, error)

GetFullExePath returns the fullpath of the executable including the executable name itself

func (*Fs) GetFullPath

func (fs *Fs) GetFullPath() (string, error)

GetFullPath returns the fullpath of the executable without the executable name

func (*Fs) GetFullPathWithExec

func (fs *Fs) GetFullPathWithExec() (string, error)

GetFullPathWithExec returns the fullpath of the executable

func (*Fs) GetPathFromFullFilename

func (fs *Fs) GetPathFromFullFilename(path string) string

GetPathFromFullFilename returns the parent folder name

Jump to

Keyboard shortcuts

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