fs

package
v0.0.0-...-b8e83fa Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	kustfs.File
	Name() string
}

File extends kustomize File and provide abstraction to creating temporary files

type FileSystem

type FileSystem interface {
	kustfs.FileSystem
	TempFile(string, string) (File, error)
	TempDir(string, string) (string, error)
	Chmod(string, os.FileMode) error
	Dir(string) string
}

FileSystem extends kustomize FileSystem and provide abstraction to creating temporary files

func NewDocumentFs

func NewDocumentFs() FileSystem

NewDocumentFs returns an instance of Fs

type Fs

type Fs struct {
	kustfs.FileSystem
}

Fs is adaptor to TempFile

func (Fs) Chmod

func (dfs Fs) Chmod(path string, mode os.FileMode) error

Chmod applies desired permissions on file

func (Fs) Dir

func (dfs Fs) Dir(path string) string

Dir returns all but the last element of path, typically the path's directory

func (Fs) TempDir

func (dfs Fs) TempDir(rootDir string, prefix string) (string, error)

TempDir creates a temporary directory in given root directory

func (Fs) TempFile

func (dfs Fs) TempFile(tmpDir string, prefix string) (File, error)

TempFile creates file in temporary filesystem, at default os.TempDir

Jump to

Keyboard shortcuts

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