fsutil

package
v0.0.0-...-989fa2c Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fsutil contains filesystem utilities that can be shared between the sentry and other sandbox components.

Index

Constants

This section is empty.

Variables

View Source
var UnixDirentMaxSize = int(unsafe.Sizeof(unix.Dirent{}))

UnixDirentMaxSize is the maximum size of unix.Dirent in bytes.

Functions

func ParseDirents

func ParseDirents(buf []byte, handleDirent func(ino uint64, off int64, ftype uint8, name string, reclen uint16) bool)

ParseDirents parses dirents from buf. buf must have been populated by getdents64(2) syscall. It calls the handleDirent callback for each dirent.

func RenameAt

func RenameAt(oldDirFD int, oldName string, newDirFD int, newName string) error

RenameAt is a convenience wrapper to make the renameat(2) syscall. It additionally handles empty names.

func StatAt

func StatAt(dirFd int, name string) (unix.Stat_t, error)

StatAt is a convenience wrapper around newfstatat(2).

func Utimensat

func Utimensat(dirFd int, name string, times [2]unix.Timespec, flags int) error

Utimensat is a convenience wrapper to make the utimensat(2) syscall. It additionally handles empty name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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