ramfs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: BSD-3-Clause Imports: 7 Imported by: 2

Documentation

Overview

Package ramfs implements an in RAM file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

An FS represents a file system in RAM.

func New

func New(name string, maxSize int64) *FS

func (*FS) Mkdir

func (fsys *FS) Mkdir(name string, _ fs.FileMode) error

Mkdir creates a directory with a given name.

func (*FS) Name

func (fsys *FS) Name() string

Name implements the rtos.FS Name method.

func (*FS) Open

func (fsys *FS) Open(name string) (fs.File, error)

Open implements the fs.FS Open method.

func (*FS) OpenWithFinalizer

func (fsys *FS) OpenWithFinalizer(name string, flag int, _ fs.FileMode, closed func()) (fs.File, error)

OpenWithFinalizer implements the rtos.FS OpenWithFinalizer method.

func (*FS) Remove

func (fsys *FS) Remove(name string) error

func (*FS) Rename

func (fsys *FS) Rename(oldname, newname string) error

func (*FS) Type

func (fsys *FS) Type() string

Type implements the rtos.FS Type method.

func (*FS) Usage

func (fsys *FS) Usage() (usedItems, maxItems int, usedBytes, maxBytes int64)

Usage implements the rtos.UsageFS Usage method.

Jump to

Keyboard shortcuts

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