Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/capnspacehook/pandorasbox
/ functions
Functions
265 in github.com/capnspacehook/pandorasbox
⨍
Functions
265
◇
Types & classes
19
↓ 38 callers
Function
NewFS
()
vfs/vfs.go:84
↓ 32 callers
Method
Close
Close closes the File, rendering it unusable for I/O. It returns an error, if any.
absfs/file.go:73
↓ 26 callers
Function
ConvertVFSPath
(path string)
utils.go:14
↓ 26 callers
Method
New
(mode os.FileMode)
inode/inode.go:53
↓ 26 callers
Method
OpenFile
OpenFile is the generalized open call; most users will use Open or Create instead. It opens the named file with specified flag (os.O_RDONLY etc.). If
absfs/filesystem.go:20
↓ 24 callers
Method
Stat
Stat returns the FileInfo structure describing file. If there is an error, it will be of type *PathError.
absfs/file.go:53
↓ 23 callers
Method
Mkdir
Mkdir creates a new directory with the specified name and permission bits (before umask). If there is an error, it will be of type *fs.PathError.
absfs/filesystem.go:46
↓ 20 callers
Method
Link
Link - link adds a directory entry (DirEntry) for the given node (assumed to be a directory) to the provided child Inode.
inode/inode.go:85
↓ 19 callers
Method
Name
Name returns the name of the file as presented to Open.
absfs/file.go:9
↓ 19 callers
Method
Write
Write writes len(b) bytes to the File. It returns the number of bytes written and an error, if any. Write returns a non-nil error when n != len(b).
absfs/file.go:40
↓ 18 callers
Method
Rename
Rename renames (moves) oldpath to newpath. If newpath already exists and is not a directory, Rename replaces it. OS-specific restrictions may apply wh
absfs/filesystem.go:68
↓ 17 callers
Method
Resolve
(path string)
inode/inode.go:201
↓ 14 callers
Method
Create
Create creates or truncates the named file. If the file already exists, it is truncated. If the file does not exist, it is created with mode 0666 (bef
absfs/filesystem.go:27
↓ 13 callers
Method
Truncate
Truncate changes the size of the file. It does not change the I/O offset. If there is an error, it will be of type *fs.PathError.
absfs/file.go:69
↓ 12 callers
Method
Size
()
vfs/vfsfile.go:443
↓ 12 callers
Function
checkSize
(t *testing.T, f absfs.File, size int64)
vfs/vfs_test.go:832
↓ 11 callers
Method
IsDir
()
inode/inode.go:150
↓ 11 callers
Method
NewDir
(mode os.FileMode)
inode/inode.go:70
↓ 11 callers
Method
Read
Read reads up to len(b) bytes from the File. It returns the number of bytes read and any error encountered. At end of file, Read returns 0, io.EOF.
absfs/file.go:13
↓ 11 callers
Method
ReadFile
ReadFile reads the named file and returns its contents. A successful call returns a nil error, not io.EOF. (Because ReadFile reads the whole file, the
absfs/filesystem.go:33
↓ 11 callers
Method
Seek
Seek sets the offset for the next Read or Write on file to offset, interpreted according to whence: 0 means relative to the origin of the file, 1 mean
absfs/file.go:60
↓ 11 callers
Method
TempDir
TempDir returns the default directory to use for temporary files. The directory is neither guaranteed to exist nor have accessible permissions.
absfs/filesystem.go:114
↓ 11 callers
Method
WriteFile
WriteFile writes data to the named file, creating it if necessary. If the file does not exist, WriteFile creates it with permissions perm (before umas
absfs/filesystem.go:42
↓ 10 callers
Method
IsDir
()
vfs/vfsfile.go:422
↓ 10 callers
Method
Remove
Remove removes the named file or (empty) directory. If there is an error, it will be of type *fs.PathError.
absfs/filesystem.go:72
↓ 9 callers
Function
MakeVFSPath
(path string)
utils.go:30
↓ 9 callers
Method
Open
Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_
absfs/filesystem.go:13
↓ 9 callers
Method
ReadDir
Readdir reads the contents of the directory associated with file and returns a slice of up to n FileInfo values, as would be returned by Lstat, in dir
absfs/file.go:35
↓ 8 callers
Method
Chdir
Chdir changes the current working directory to the named directory. If there is an error, it will be of type *fs.PathError.
absfs/filesystem.go:103
↓ 8 callers
Method
WriteString
WriteString is like Write, but writes the contents of string s rather than a slice of bytes.
absfs/file.go:49
↓ 7 callers
Method
Getwd
Getwd returns a rooted path name corresponding to the current directory. If the current directory can be reached via multiple paths (due to symbolic l
absfs/filesystem.go:109
↓ 6 callers
Method
MkdirAll
MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. The permission bits perm (before
absfs/filesystem.go:52
↓ 6 callers
Method
WalkDir
WalkDir walks the file tree rooted at root, calling fn for each file or directory in the tree, including root. All errors that arise visiting files an
absfs/filesystem.go:89
↓ 6 callers
Function
newFile
(t *testing.T, fs absfs.FileSystem, testName string)
vfs/vfs_test.go:936
↓ 6 callers
Function
writeFile
nolint:unparam
vfs/vfs_test.go:1115
↓ 5 callers
Method
Lstat
Lstat returns a FileInfo describing the named file. If the file is a symbolic link, the returned FileInfo describes the symbolic link. Lstat makes no
absfs/filesystem.go:62
↓ 5 callers
Method
RemoveAll
RemoveAll removes path and any children it contains. It removes everything it can but returns the first error it encounters. If the path does not exis
absfs/filesystem.go:78
↓ 4 callers
Method
Abs
Abs returns an absolute representation of path. If the path is not absolute it will be joined with the current working directory to turn it into an ab
absfs/filesystem.go:96
↓ 4 callers
Method
Len
()
inode/inode.go:47
↓ 4 callers
Method
ReadAt
ReadAt reads len(b) bytes from the File starting at byte offset off. It returns the number of bytes read and the error, if any. ReadAt always returns
absfs/file.go:19
↓ 4 callers
Method
Unlink
Unlink - removes the directory entry (DirEntry).
inode/inode.go:108
↓ 4 callers
Method
WriteAt
WriteAt writes len(b) bytes to the File starting at byte offset off. It returns the number of bytes written and an error, if any. WriteAt returns a no
absfs/file.go:45
↓ 4 callers
Function
checkPath
(name, op string)
vfs/vfs.go:63
↓ 4 callers
Method
countDown
()
inode/inode.go:247
↓ 3 callers
Function
Abs
Abs returns name if name is an absolute path. If name is a relative path then an absolute path is constructed by using cwd as the current working dire
inode/pathutils.go:11
↓ 3 callers
Method
ListSeparator
()
absfs/filesystem.go:99
↓ 3 callers
Method
OpenFile
(name string, flag int, perm stdfs.FileMode)
vfs/vfs.go:117
↓ 3 callers
Method
Separator
()
absfs/filesystem.go:98
↓ 3 callers
Function
Walk
(node *Inode, path string, fn func(path string, n *Inode) error)
inode/inode_test.go:630
↓ 3 callers
Method
addOffset
(offset int64)
vfs/vfsfile.go:67
↓ 3 callers
Method
decrypt
decrypt returns the plaintext of the sealed file. It must be called under lock.
vfs/vfsfile.go:77
↓ 3 callers
Method
encrypt
encrypt encrypts plaintext, stores the ciphertext in the sealed file and updates the file size. It must be called under lock.
vfs/vfsfile.go:93
↓ 3 callers
Method
find
(name string)
inode/inode.go:281
↓ 3 callers
Method
modified
()
inode/inode.go:236
↓ 3 callers
Function
randBytes
(t *testing.T, r *rand.Rand)
vfs/vfs_fuzz_test.go:335
↓ 3 callers
Function
reseed
()
ioutil/tempfile.go:28
↓ 3 callers
Method
size
()
vfs/vfsfile.go:52
↓ 3 callers
Function
walkTree
(n *Node, path string, f func(path string, n *Node))
vfs/walk_test.go:46
↓ 2 callers
Method
FS
()
absfs/filesystem.go:8
↓ 2 callers
Method
IsPathSeparator
(c uint8, vfsMode bool)
box.go:187
↓ 2 callers
Function
IsVFSPath
(path string)
utils.go:26
↓ 2 callers
Function
Mkdir
(name string, perm fs.FileMode)
pandoras_box.go:48
↓ 2 callers
Method
ModTime
()
vfs/vfsfile.go:454
↓ 2 callers
Method
Open
(name string)
vfs/vfs.go:113
↓ 2 callers
Function
PopPath
PopPath returns the first name in `path` and the rest of the `path` string. The path provided must use forward slashes ("/").
inode/pathutils.go:21
↓ 2 callers
Method
Truncate
(size int64)
vfs/vfsfile.go:343
↓ 2 callers
Method
accessed
()
inode/inode.go:232
↓ 2 callers
Method
countUp
()
inode/inode.go:242
↓ 2 callers
Method
mkdir
(name string, perm stdfs.FileMode)
vfs/vfs.go:310
↓ 2 callers
Function
nextSuffix
()
ioutil/tempfile.go:32
↓ 2 callers
Method
read
(p []byte, offset int64)
vfs/vfsfile.go:117
↓ 2 callers
Method
setOffset
(offset int64)
vfs/vfsfile.go:60
↓ 2 callers
Method
write
(p []byte, offset int64)
vfs/vfsfile.go:238
↓ 1 callers
Method
FS
()
vfs/vfs.go:97
↓ 1 callers
Method
GetTempDir
(vfsMode bool)
box.go:211
↓ 1 callers
Method
Getwd
()
vfs/vfs.go:595
↓ 1 callers
Function
IsPathSeparator
(c uint8)
osfs/utils.go:7
↓ 1 callers
Function
IsPathSeparator
(c uint8)
vfs/utils.go:3
↓ 1 callers
Method
Name
()
vfs/vfsfile.go:56
↓ 1 callers
Function
NewBox
()
box.go:18
↓ 1 callers
Function
NewFS
()
osfs/osfs.go:25
↓ 1 callers
Function
SameFile
(fi1, fi2 os.FileInfo)
osfs/utils.go:11
↓ 1 callers
Function
SameFile
(fi1, fi2 *FileInfo)
vfs/utils.go:7
↓ 1 callers
Method
Separator
()
vfs/vfs.go:555
↓ 1 callers
Method
Stat
(name string)
vfs/vfs.go:367
↓ 1 callers
Method
SubIno
()
inode/inode.go:66
↓ 1 callers
Method
Sync
Sync commits the current contents of the file to stable storage. Typically, this means flushing the file system's in-memory copy of recently written d
absfs/file.go:65
↓ 1 callers
Function
TempDir
TempDir creates a new temporary directory in the directory dir of the absfs.FileSystem fs with a name beginning with prefix and returns the path of th
ioutil/tempfile.go:88
↓ 1 callers
Function
TempFile
TempFile creates a new temporary file in the directory dir of the absfs.FileSystem fs with a name beginning with prefix, opens the file for reading an
ioutil/tempfile.go:53
↓ 1 callers
Method
UnlinkAll
()
inode/inode.go:128
↓ 1 callers
Method
Write
(p []byte)
vfs/vfsfile.go:231
↓ 1 callers
Function
checkErrFunc
checkErrFunc returns a function that checks if an error is nil or of an expected type. Otherwise it will log the error and fail the test. Because we a
vfs/vfs_fuzz_test.go:310
↓ 1 callers
Function
checkMarks
(t *testing.T, report bool)
vfs/walk_test.go:75
↓ 1 callers
Function
convertVFSPath
(path string)
utils.go:22
↓ 1 callers
Method
fileStat
(cwd, name string)
vfs/vfs.go:382
↓ 1 callers
Method
linkSwapi
(i int, entry *DirEntry)
inode/inode.go:263
↓ 1 callers
Method
linki
(i int, entry *DirEntry)
inode/inode.go:271
↓ 1 callers
Function
makeTree
(t *testing.T)
vfs/walk_test.go:53
↓ 1 callers
Function
mark
Assumes that each node name is unique. Good enough for a test. If err if not nil, it is appended to errors.
vfs/walk_test.go:88
↓ 1 callers
Method
unlinki
(i int)
inode/inode.go:255
next →
1–100 of 265, ranked by callers