fs

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fs

type Fs interface {
	// contains filtered or unexported methods
}

Fs represents an abstract filesytem

type Localfs

type Localfs struct{}

Localfs provides methods to manipulate files local filesystem

func NewLocalfs

func NewLocalfs() (Localfs, error)

NewLocalfs creates a new Localfs struct

type Sftpfs

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

Sftpfs provides methods to manipulate files on an SFTP server

func NewSftpfs

func NewSftpfs(addr string, user string, pass string, publickey string) (Sftpfs, error)

NewSftpfs creates a new Sftpfs struct

type Transfer

type Transfer struct {
	Srcfs   Fs
	Srcroot string
	Dstfs   Fs
	Dstroot string
	Debug   *log.Logger
	Info    *log.Logger
	Error   *log.Logger

	Earliest time.Time // earliest file time to transfer
	// contains filtered or unexported fields
}

Transfer provides methods to copy SeaFlow data from a source to a destination location

func (*Transfer) Close

func (t *Transfer) Close() (err error)

Close releases any resources held

func (*Transfer) CopyEVTFiles

func (t *Transfer) CopyEVTFiles() error

CopyEVTFiles copies EVT files from source to destination. Files are gzip compressed before copying to desination. Source files are identifed as <root>/<day-of-year-directory>/<filename>, with no extension. Files present in both source and destination are not copied. ".gz" extensions are stripped from destination files before matching to source file names. The most recent EVT file by filename timestamp is not copied since it may still be open for writing.

func (*Transfer) CopyFile

func (t *Transfer) CopyFile(path string, gzipFlag bool) error

CopyFile copies one file from source to destination

func (*Transfer) CopySFLFiles

func (t *Transfer) CopySFLFiles() error

CopySFLFiles copies SFL files from source to destination. Files are identifed as <root>/<day-of-year-directory>/<filename>.

Jump to

Keyboard shortcuts

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