Documentation
¶
Overview ¶
Package tmpfs is a filesystem implementation backed by memory.
Index ¶
- Constants
- func NewDir(ctx context.Context, contents map[string]*fs.Inode, owner fs.FileOwner, ...) *fs.Inode
- func NewFifo(ctx context.Context, owner fs.FileOwner, perms fs.FilePermissions, ...) *fs.Inode
- func NewInMemoryFile(ctx context.Context, usage usage.MemoryKind, uattr fs.UnstableAttr, ...) fs.InodeOperations
- func NewSocket(ctx context.Context, socket unix.BoundEndpoint, owner fs.FileOwner, ...) *fs.Inode
- func NewSymlink(ctx context.Context, target string, owner fs.FileOwner, msrc *fs.MountSource) *fs.Inode
- type Dir
- type Fifo
- type Filesystem
- type Socket
- type Symlink
Constants ¶
View Source
const FilesystemName = "tmpfs"
FilesystemName is the name underwhich the filesystem is registered. Name matches mm/shmem.c:shmem_fs_type.name.
Variables ¶
This section is empty.
Functions ¶
func NewDir ¶
func NewDir(ctx context.Context, contents map[string]*fs.Inode, owner fs.FileOwner, perms fs.FilePermissions, msrc *fs.MountSource, platform platform.Platform) *fs.Inode
NewDir returns a new directory.
func NewFifo ¶
func NewFifo(ctx context.Context, owner fs.FileOwner, perms fs.FilePermissions, msrc *fs.MountSource) *fs.Inode
NewFifo creates a new named pipe.
func NewInMemoryFile ¶
func NewInMemoryFile(ctx context.Context, usage usage.MemoryKind, uattr fs.UnstableAttr, p platform.Platform) fs.InodeOperations
NewInMemoryFile returns a new file backed by p.Memory().
func NewSocket ¶
func NewSocket(ctx context.Context, socket unix.BoundEndpoint, owner fs.FileOwner, perms fs.FilePermissions, msrc *fs.MountSource) *fs.Inode
NewSocket returns a new socket with the provided permissions.
Types ¶
type Dir ¶
Dir is a directory.
type Fifo ¶
Fifo is a tmpfs named pipe.
type Filesystem ¶
type Filesystem struct{}
Filesystem is a tmpfs.
func (*Filesystem) AllowUserMount ¶
func (*Filesystem) AllowUserMount() bool
AllowUserMount allows users to mount(2) this file system.
func (*Filesystem) Flags ¶
func (*Filesystem) Flags() fs.FilesystemFlags
Flags returns that there is nothing special about this file system.
In Linux, tmpfs returns FS_USERNS_MOUNT, see mm/shmem.c.
type Socket ¶
Socket is a socket.
Click to show internal directories.
Click to hide internal directories.