filesys

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunListen

func RunListen(o OS) error

RunListen is the listener runner

Types

type FileManager

type FileManager struct {
	Pwd string
}

FileManager is in charge for OS management

func (FileManager) AddListener

func (fm FileManager) AddListener() error

AddListener listen for file creation

func (FileManager) ReadFileContent

func (fm FileManager) ReadFileContent(fileName string) (string, error)

ReadFileContent read file content and return it

type MockFileManager

type MockFileManager struct {
	Pwd string
}

MockFileManager is the FileManager mock

func (MockFileManager) AddListener

func (mfm MockFileManager) AddListener() error

AddListener listen for file creation

func (MockFileManager) ReadFileContent

func (mfm MockFileManager) ReadFileContent(fileName string) (string, error)

ReadFileContent read file content and return it

type OS

type OS interface {
	AddListener() error
	ReadFileContent(string) (string, error)
}

OS is the main package interface

Jump to

Keyboard shortcuts

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