fsx

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package fsx contains file system extension

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS interface {
	Open(name string) (File, error)
}

FS is a generic file system. Like File, it's adapted from the draft iofs golang design document.

type File

type File interface {
	Stat() (os.FileInfo, error)
	Read([]byte) (int, error)
	Close() error
}

File is a generic file. This interface is taken from the draft iofs golang design. We'll use fs.File when available.

func Open

func Open(pathname string) (File, error)

Open is a wrapper for os.Open that ensures that we're opening a file.

func OpenWithFS

func OpenWithFS(fs FS, pathname string) (File, error)

OpenWithFS is like Open but with explicit file system argument.

Jump to

Keyboard shortcuts

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