{"modulePath":"github.com/nextlinux/tracee","version":"v0.0.0-20230527010910-d4ca6f93c448","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package utils\n\n## Functions\n\n```go\nfunc ClearBit(n *uint64, offset uint)\n```\n\n```go\nfunc ClearBits(n *uint64, mask uint64)\n```\n\n```go\nfunc CopyRegularFileByPath(src, dst string) error\n```\nCopyRegularFileByPath copies a file from src to dst\n\n```go\nfunc CopyRegularFileByRelativePath(srcName string, dstDir *os.File, dstName string) error\n```\nCopyRegularFileByRelativePath copies a file from src to dst, where destination is relative to a given directory. This function needs needed capabilities to be set before it is called.\n\n```go\nfunc CreateAt(dir *os.File, relativePath string) (*os.File, error)\n```\nCreateAt implements the same logic as os.Create using directory FD and relative path.\n\n```go\nfunc Dup(file *os.File) (*os.File, error)\n```\nDup is a wrapper function to the \\`dup\\` syscall using golang types.\n\n```go\nfunc HasBit(n uint64, offset uint) bool\n```\n\n```go\nfunc IsDirEmpty(pathname string) (bool, error)\n```\nIsDirEmpty returns true if directory contains no files\n\n```go\nfunc Max(x, y uint64) uint64\n```\n\n```go\nfunc Min(x, y uint64) uint64\n```\n\n```go\nfunc MkdirAt(dir *os.File, relativePath string, perm fs.FileMode) error\n```\nMkdirAt is a wrapper function to the \\`mkdirat\\` syscall using golang types.\n\n```go\nfunc MkdirAtExist(dir *os.File, relativePath string, perm fs.FileMode) error\n```\nMkdirAtExist is a wrapper function to the \\`mkdirat\\` syscall using golang types, ignoring EEXIST error.\n\n```go\nfunc OpenAt(dir *os.File, relativePath string, flags int, perm fs.FileMode) (*os.File, error)\n```\nOpenAt is a wrapper function to the \\`openat\\` syscall using golang types.\n\n```go\nfunc OpenExistingDir(p string) (*os.File, error)\n```\nOpenExistingDir open a directory with given path, and return the os.File of it.\n\n```go\nfunc ParseSymbol(address uint64, table helpers.KernelSymbolTable) *helpers.KernelSymbol\n```\n\n```go\nfunc RemoveAt(dir *os.File, relativePath string, flags int) error\n```\nRemoveAt is a wrapper function to the \\`unlinkat\\` syscall using golang types.\n\n```go\nfunc RenameAt(olddir *os.File, oldpath string, newdir *os.File, newpath string) error\n```\nRenameAt is a wrapper function to the \\`renameat\\` syscall using golang types.\n\n```go\nfunc SetBit(n *uint64, offset uint)\n```\n\n","path":"github.com/nextlinux/tracee/pkg/utils","name":"utils","synopsis":"","isRedistributable":true}
