safefile

package
v0.7.12-1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FILE_READ_ATTRIBUTES  = 0x0080
	FILE_WRITE_ATTRIBUTES = 0x0100
	DELETE                = 0x10000

	FILE_OPEN   = 1
	FILE_CREATE = 2

	FILE_DIRECTORY_FILE          = 0x00000001
	FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020
	FILE_DELETE_ON_CLOSE         = 0x00001000
	FILE_OPEN_FOR_BACKUP_INTENT  = 0x00004000
	FILE_OPEN_REPARSE_POINT      = 0x00200000

	FILE_DISPOSITION_DELETE = 0x00000001
)

Variables

This section is empty.

Functions

func EnsureNotReparsePointRelative

func EnsureNotReparsePointRelative(path string, root *os.File) error

EnsureNotReparsePointRelative validates that a given file (relative to a root) and all intermediate path components are not a reparse points.

func LinkRelative

func LinkRelative(oldname string, oldroot *os.File, newname string, newroot *os.File) error

LinkRelative creates a hard link from oldname to newname (relative to oldroot and newroot), failing if any of the intermediate path components are reparse points.

func LstatRelative

func LstatRelative(path string, root *os.File) (os.FileInfo, error)

LstatRelative performs a stat operation on a file relative to a root, failing if any intermediate path components are reparse points.

func MkdirRelative

func MkdirRelative(path string, root *os.File) error

MkdirRelative creates a directory relative to a root, failing if any intermediate path components are reparse points.

func OpenRelative

func OpenRelative(path string, root *os.File, accessMask uint32, shareFlags uint32, createDisposition uint32, flags uint32) (*os.File, error)

OpenRelative opens a relative path from the given root, failing if any of the intermediate path components are reparse points.

func OpenRoot

func OpenRoot(path string) (*os.File, error)

func RemoveAllRelative

func RemoveAllRelative(path string, root *os.File) error

RemoveAllRelative removes a directory tree relative to a root, failing if any intermediate path components are reparse points.

func RemoveRelative

func RemoveRelative(path string, root *os.File) error

RemoveRelative removes a file or directory relative to a root, failing if any intermediate path components are reparse points.

Types

This section is empty.

Jump to

Keyboard shortcuts

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