fileio

package
v0.6.1-b Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinIfFirstNotEmpty

func JoinIfFirstNotEmpty(elem ...string) string

JoinIfFirstNotEmpty only joins filepaths if the first element is not empty

Types

type SearcherFilesystem

type SearcherFilesystem []http.FileSystem

SearcherFilesystem is a http.Filesystem that looks through multiple http. Filesystems for a file returning the first one found

func NewLocalAndOtherSearcherFilesystem

func NewLocalAndOtherSearcherFilesystem(basePath string, other ...http.FileSystem) SearcherFilesystem

NewLocalAndOtherSearcherFilesystem creates a SearcherFilesystem from a local basePath ( if not empty) and other http.FileSystems. The local fs will be the first one.

func (SearcherFilesystem) Open

func (lfs SearcherFilesystem) Open(name string) (http.File, error)

Open implements the http.FileSystem interface

Jump to

Keyboard shortcuts

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