support

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPosixFS

func GetPosixFS() afs.FS

GetPosixFS ...

func GetWindowsFS added in v0.0.6

func GetWindowsFS() afs.FS

GetWindowsFS ...

Types

type CommonFileSystem

type CommonFileSystem interface {
	PathToElements(path string) []string
	ElementsToPath(elements []string, prefix string, sep string) string
	NormalizePathElements(elements []string) ([]string, error)
	PrepareOptions(path afs.Path, have *afs.Options, want afs.WantOption) *afs.Options
	SetDefaultOptionsHandler(fn afs.OptionsHandlerFunc) error
}

CommonFileSystem 所有平台共享的核心结构

type CommonFileSystemCore

type CommonFileSystemCore struct {
	// contains filtered or unexported fields
}

CommonFileSystemCore 所有平台共享的核心结构

func (*CommonFileSystemCore) ElementsToPath

func (inst *CommonFileSystemCore) ElementsToPath(elements []string, prefix string, gap string) string

ElementsToPath 把文件名元素拼接成路径

func (*CommonFileSystemCore) NormalizePathElements

func (inst *CommonFileSystemCore) NormalizePathElements(src []string) ([]string, error)

NormalizePathElements 标准化

func (*CommonFileSystemCore) PathToElements

func (inst *CommonFileSystemCore) PathToElements(path string) []string

PathToElements 把路径拆分成文件名元素

func (*CommonFileSystemCore) PrepareOptions added in v0.0.8

func (inst *CommonFileSystemCore) PrepareOptions(p afs.Path, have *afs.Options, want afs.WantOption) *afs.Options

func (*CommonFileSystemCore) SetDefaultOptionsHandler added in v0.0.8

func (inst *CommonFileSystemCore) SetDefaultOptionsHandler(h afs.OptionsHandlerFunc) error

type PlatformFileSystem

type PlatformFileSystem interface {
	NormalizePath(path string) (string, error)
	PathSeparator() string
	Separator() string
	ListRoots() []string
	GetCommonFileSystem() CommonFileSystem
	GetFS() afs.FS
}

PlatformFileSystem 各个平台独有的核心结构

Jump to

Keyboard shortcuts

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