fakefs

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package fakefs provides a fake file system implementation for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeFileInfo

type FakeFileInfo struct {
	FileName    string
	FileSize    int64
	FileMode    fs.FileMode
	FileModTime time.Time
}

FakeFileInfo is a fake implementation of fs.FileInfo.

func (FakeFileInfo) IsDir

func (i FakeFileInfo) IsDir() bool

IsDir returns true if the file is a directory.

func (FakeFileInfo) ModTime

func (i FakeFileInfo) ModTime() time.Time

ModTime returns the modification time of the file.

func (FakeFileInfo) Mode

func (i FakeFileInfo) Mode() fs.FileMode

Mode returns the mode of the file.

func (FakeFileInfo) Name

func (i FakeFileInfo) Name() string

Name returns the name of the file.

func (FakeFileInfo) Size

func (i FakeFileInfo) Size() int64

Size returns the size of the file.

func (FakeFileInfo) Sys

func (i FakeFileInfo) Sys() any

Sys is an implementation of FileInfo.Sys() that returns nothing (nil).

Jump to

Keyboard shortcuts

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