fs

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 2 Imported by: 1

README

Package fs v1.0.2

Godoc Documentation

Purpose

This package contains common methods around file manipulation. As well as an in-memory implementation of these operations to use for tests especially.

Constructors
  • NewOsFs()
  • NewMemFs()

Warning

  • Chown
  • Link
  • Symlink

Are no-op for MemFs implementation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fs

type Fs interface {
	afero.Fs
	Chown(string, int, int) error
	Link(string, string) error
	Symlink(string, string) error
}

Fs interface contains all methods implemented in MemFs and OsFs

type MemFs

type MemFs struct {
	afero.Fs
}

func NewMemFs

func NewMemFs() MemFs

func (MemFs) Chown

func (fs MemFs) Chown(string, int, int) error
func (fs MemFs) Link(string, string) error
func (fs MemFs) Symlink(string, string) error

type OsFs

type OsFs struct {
	afero.Fs
}

func NewOsFs

func NewOsFs() OsFs

func (OsFs) Chown

func (fs OsFs) Chown(path string, uid int, gid int) error
func (fs OsFs) Link(old, new string) error
func (fs OsFs) Symlink(old, new string) error

Jump to

Keyboard shortcuts

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