utility

package
v0.0.0-...-d599ef7 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2017 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(source string, dest string, hardCopy bool, verbose bool, ignore ...string) error

func DownloadFile

func DownloadFile(filepath string, downloadUrl string) (err error)

func ForceRename

func ForceRename(src string, dest string) error

func IgnoreDestination

func IgnoreDestination(c *WatchFileContext, eventPath string)

func ParseManifest

func ParseManifest(fileUri string) (*models.PluginManifest, error)

func StartGoCMS

func StartGoCMS(destDir string, goCMSDevMode bool, doneChan chan bool)

start goCMS

func Unzip

func Unzip(src, dest string) error

func WatchFilesForCarbonCopy

func WatchFilesForCarbonCopy(src string, dest string, verbose bool, ignore ...string)

Types

type CopyContext

type CopyContext struct {
	Source      string
	Destination string
	Verbose     bool
	Ignore      []string
}

type FilePathHelper

type FilePathHelper struct {
	Current string
}

func NewFilePathHelper

func NewFilePathHelper(p string) FilePathHelper

func (*FilePathHelper) AddBackupDirPath

func (cd *FilePathHelper) AddBackupDirPath(f string) string

func (*FilePathHelper) AddStagingDirPath

func (cd *FilePathHelper) AddStagingDirPath(f string) string

func (*FilePathHelper) AddWorkingDirPath

func (cd *FilePathHelper) AddWorkingDirPath(f string) string

func (*FilePathHelper) BackupToWorking

func (cd *FilePathHelper) BackupToWorking(fileName string) error

func (*FilePathHelper) StagingToWorking

func (cd *FilePathHelper) StagingToWorking(fileName string) error

func (*FilePathHelper) WorkingToBackup

func (cd *FilePathHelper) WorkingToBackup(fileName string) error

type WatchFileContext

type WatchFileContext struct {
	Verbose          bool
	SourceBase       string
	DestinationBase  string
	IgnorePaths      []string
	DoneChan         chan bool
	ChangeTimeoutMap map[string]time.Time
	Chmod            func(c *WatchFileContext, eventPath string)
	Removed          func(c *WatchFileContext, eventPath string)
	Create           func(c *WatchFileContext, eventPath string)
	Rename           func(c *WatchFileContext, eventPath string)
	Write            func(c *WatchFileContext, eventPath string)
}

func (*WatchFileContext) Watch

func (c *WatchFileContext) Watch()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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