action

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MakeDirectoryAction

type MakeDirectoryAction struct {
	AbsoluteDirPath string
}

MakeDirectoryAction is a SyncAction for creating a directory

func (MakeDirectoryAction) Perform

func (a MakeDirectoryAction) Perform() error

Perform the 'create directory' action

func (MakeDirectoryAction) String

func (a MakeDirectoryAction) String() string

func (MakeDirectoryAction) Uniqueness

func (a MakeDirectoryAction) Uniqueness() string

Uniqueness generates unique string for directory creation

func (MakeDirectoryAction) UnixCommand

func (a MakeDirectoryAction) UnixCommand() string

UnixCommand for creating a directory

type MoveFileAction

type MoveFileAction struct {
	BasePath         string
	RelativeFromPath string
	RelativeToPath   string
}

MoveFileAction is a SyncAction for moving or renaming a file

func (MoveFileAction) Perform

func (a MoveFileAction) Perform() error

Perform 'file move/rename' action

func (MoveFileAction) String

func (a MoveFileAction) String() string

func (MoveFileAction) Uniqueness

func (a MoveFileAction) Uniqueness() string

Uniqueness generates unique string for file renaming/movement

func (MoveFileAction) UnixCommand

func (a MoveFileAction) UnixCommand() string

UnixCommand for moving or renaming a file

type PropagateTimestampAction

type PropagateTimestampAction struct {
	SourceBaseDirPath           string
	DestinationBaseDirPath      string
	SourceFileRelativePath      string
	DestinationFileRelativePath string
}

PropagateTimestampAction is a SyncAction for propagating 'file modification timestamp' from one file to another

func (PropagateTimestampAction) Perform

func (a PropagateTimestampAction) Perform() error

Perform the 'file modification timestamp' propagation action

func (PropagateTimestampAction) String

func (a PropagateTimestampAction) String() string

func (PropagateTimestampAction) Uniqueness

func (a PropagateTimestampAction) Uniqueness() string

Uniqueness generate unique string for 'file modification timestamp' propagation action

func (PropagateTimestampAction) UnixCommand

func (a PropagateTimestampAction) UnixCommand() string

UnixCommand for propagating 'file modification timestamp'

type SyncAction

type SyncAction interface {

	// UnixCommand must generate a unix command
	UnixCommand() string
	// Perform must perform the actual action
	Perform() error
	// Uniqueness should define a string that's unique with an action
	Uniqueness() string
	// contains filtered or unexported methods
}

SyncAction is implemented by any action that propagates action at source to action at destination

Jump to

Keyboard shortcuts

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