MCPcopy Create free account

hub / github.com/go-git/go-billy / functions

Functions567 in github.com/go-git/go-billy

↓ 191 callersMethodJoin
Join joins any number of path elements into a single path, adding a Separator if necessary. Join calls filepath.Clean on the result; in particular, al
fs.go:88
↓ 94 callersMethodSymlink
Symlink creates a symbolic-link from link to target. target may be an absolute or relative path, and need not refer to an existing node. Parent direct
fs.go:126
↓ 83 callersMethodStat
Stat returns a FileInfo describing the named file.
fs.go:77
↓ 76 callersMethodName
Name returns the name of the file as presented to Open.
fs.go:171
↓ 63 callersFunctionnewBoundOS
(d string, deduplicatePath bool)
osfs/os_bound.go:74
↓ 57 callersFunctionWriteFile
WriteFile writes data to a file named by filename in the given filesystem. If the file does not exist, WriteFile creates it with permissions perm; oth
util/util.go:109
↓ 47 callersMethodClose
()
test/mock.go:126
↓ 44 callersMethodOpen
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_
fs.go:70
↓ 42 callersFunctionNew
Aligns with POSIX_SYMLOOP_MAX New creates a new filesystem wrapping up the given 'fs'. The created filesystem has its base in the given ChrootHelperec
helper/chroot/chroot.go:28
↓ 39 callersMethodCreate
Create creates the named file with mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be us
fs.go:66
↓ 37 callersMethodIsDir
()
memfs/memory.go:382
↓ 37 callersMethodMkdirAll
MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. The permission bits perm are use
fs.go:113
↓ 37 callersMethodReadDir
ReadDir reads the directory named by dirname and returns a list of directory entries sorted by filename.
fs.go:108
↓ 31 callersMethodOpenFile
OpenFile is the generalized open call; most users will use Open or Create instead. It opens the named file with specified flag (O_RDONLY etc.) and per
fs.go:75
↓ 29 callersFunctionNew
New returns a new Memory filesystem.
memfs/memory.go:32
↓ 28 callersMethodReadlink
Readlink returns the target path of link.
fs.go:128
↓ 27 callersMethodRename
Rename renames (moves) oldpath to newpath. If newpath already exists and is not a directory, Rename replaces it. OS-specific restrictions may apply wh
fs.go:81
↓ 26 callersMethodLstat
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
fs.go:122
↓ 25 callersMethodRemove
Remove removes the named file or directory.
fs.go:83
↓ 21 callersMethodChroot
Chroot returns a new filesystem from the same type where the new root is the given path. Files outside of the designated directory tree cannot be acce
fs.go:163
↓ 18 callersMethodNew
(path string, mode os.FileMode, flag int)
memfs/storage.go:32
↓ 17 callersMethodCapabilities
Capabilities returns the capabilities of a filesystem in bit flags.
fs.go:191
↓ 17 callersMethodClose
()
memfs/memory.go:304
↓ 17 callersFunctionnotFoundError
()
osfs/os_bound_test.go:1360
↓ 16 callersMethodTempFile
TempFile creates a new temporary file in the directory dir with a name beginning with prefix, opens the file for reading and writing, and returns the
fs.go:100
↓ 16 callersMethodWrite
(p []byte)
memfs/memory.go:285
↓ 15 callersMethodMode
()
memfs/memory.go:374
↓ 14 callersMethodabs
abs transforms filename to an absolute path, taking into account the base dir. Relative paths won't be allowed to ascend the base dir, so `../file` wi
osfs/os_bound.go:311
↓ 14 callersMethodexpandDot
(path string)
osfs/os_bound.go:274
↓ 12 callersMethodunderlyingPath
(filename string)
helper/chroot/chroot.go:35
↓ 11 callersMethodRoot
Root returns the root path of the filesystem.
fs.go:165
↓ 10 callersMethodLock
Lock locks the file like e.g. flock. It protects against access from other processes.
fs.go:181
↓ 10 callersMethodSeek
(offset int64, whence int)
test/mock.go:122
↓ 10 callersMethodSize
()
memfs/memory.go:370
↓ 10 callersMethodUnlock
Unlock unlocks the file.
fs.go:183
↓ 9 callersFunctionNew
New creates a new filesystem wrapping up 'fs' the intercepts all the calls made and errors if fs doesn't implement any of the billy interfaces.
helper/polyfill/polyfill.go:20
↓ 9 callersFunctionclean
(path string)
memfs/storage.go:184
↓ 9 callersFunctioncleanPath
(path string)
helper/mount/mount.go:216
↓ 9 callersFunctioncreateFile
(c *C, filesystem billy.Filesystem, path string)
util/walk_test.go:141
↓ 9 callersFunctiontestCapabilities
(c *C, a, b billy.Basic)
helper/mount/mount_test.go:382
↓ 8 callersMethodGet
(path string)
memfs/storage.go:95
↓ 8 callersMethodJoin
(elem ...string)
helper/chroot/chroot.go:298
↓ 8 callersFunctionNew
New returns a new OS filesystem. By default paths are deduplicated, but still enforced under baseDir. For more info refer to WithDeduplicatePath. New
osfs/os.go:30
↓ 8 callersMethodisMountpoint
(path string)
helper/mount/mount.go:211
↓ 8 callersFunctionrequireSymlinkLoop
(c *C, err error, op string)
memfs/memory_test.go:454
↓ 7 callersMethodChmod
Chmod changes the mode of the named file to mode. If the file is a symbolic link, it changes the mode of the link's target.
fs.go:135
↓ 7 callersMethodClose
Close closes the file, implementing fs.File (and io.Closer).
helper/iofs/iofs.go:126
↓ 7 callersMethodRoot
()
helper/chroot/chroot.go:405
↓ 7 callersFunctionWalk
Walk 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 and d
util/walk.go:59
↓ 7 callersMethodmustRelToMountpoint
(path string)
helper/mount/mount.go:201
↓ 7 callersMethodtestReadClose
(c *C, f File, content string)
test/basic.go:213
↓ 7 callersMethodtestWriteClose
(c *C, f File, content string)
test/basic.go:206
↓ 6 callersFunctionNew
New creates a new filesystem wrapping up 'fs' the intercepts all the calls made to `mountpoint` path and redirecting it to `source` filesystem.
helper/mount/mount.go:27
↓ 6 callersFunctionRemoveAll
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
util/util.go:18
↓ 6 callersMethodRemoveAll
(string)
util/util.go:27
↓ 5 callersMethodModTime
()
memfs/memory.go:378
↓ 5 callersFunctionNewFilesystemSuite
NewFilesystemSuite returns a new FilesystemSuite based on the given fs.
test/fs.go:25
↓ 5 callersFunctionTempFile
TempFile creates a new temporary file in the directory dir with a name beginning with prefix, opens the file for reading and writing, and returns the
util/util.go:163
↓ 5 callersMethodfollowedPath
(filename string, followFinal bool, op string)
helper/chroot/chroot.go:43
↓ 5 callersMethodgetBasicAndPath
(path string)
helper/mount/mount.go:174
↓ 4 callersMethodLen
()
memfs/memory.go:131
↓ 4 callersMethodReadAt
(b []byte, off int64)
test/mock.go:114
↓ 4 callersFunctionTempDir
TempDir creates a new temporary directory in the directory dir with a name beginning with prefix and returns the path of the new directory. If dir is
util/util.go:193
↓ 4 callersFunctionmakeFile
(fs billyfs.Basic, t *testing.T, filename string, contents string)
helper/iofs/iofs_test.go:113
↓ 4 callersFunctionnewChrootOS
(baseDir string)
osfs/os_chroot.go:28
↓ 4 callersFunctionnewFile
(fs billy.Filesystem, f billy.File, filename string)
helper/chroot/chroot.go:428
↓ 4 callersFunctionvalidPath
TODO: implement fs.GlobFS, which will be a fair bit more code. validPath checks that name is a valid io/fs path. In addition to the standard fs.ValidP
helper/iofs/iofs.go:49
↓ 3 callersMethodHas
(path string)
memfs/storage.go:25
↓ 3 callersFunctionNew
Wrap adapts a billy.Filesystem to a io.fs.FS.
helper/iofs/iofs.go:15
↓ 3 callersFunctionReadFile
ReadFile reads the named file and returns the contents from the given filesystem. A successful call returns err == nil, not err == EOF. Because ReadFi
util/util.go:238
↓ 3 callersMethodReadFile
ReadFile reads the named file and returns its contents, implementing fs.ReadFileFS (returning contents or error).
helper/iofs/iofs.go:100
↓ 3 callersMethodcreateDir
(fullpath string)
osfs/os_chroot.go:48
↓ 3 callersMethodgetSymlinkAndPath
(path string)
helper/mount/mount.go:192
↓ 3 callersMethodinsideBaseDirEval
insideBaseDirEval checks whether filename is contained within a dir that is within the fs.baseDir, by first evaluating any symlinks that either filena
osfs/os_bound.go:334
↓ 3 callersMethodisBaseDir
(path string)
osfs/os_bound.go:290
↓ 3 callersFunctionisCrossBoundaries
(name string)
helper/chroot/chroot.go:211
↓ 3 callersFunctionmustExist
(filename string)
osfs/os_bound_test.go:1353
↓ 3 callersMethodrelativeToRoot
(filename string)
helper/chroot/chroot.go:162
↓ 3 callersFunctionreseed
()
util/util.go:140
↓ 3 callersMethodresolveLink
(fullpath string, f *file)
memfs/memory.go:77
↓ 3 callersFunctionsymlinkLoopError
(op, path string)
helper/chroot/chroot.go:124
↓ 3 callersFunctiontestCapabilities
(c *C, basic billy.Basic)
helper/chroot/chroot_test.go:413
↓ 3 callersFunctiontestCapabilities
(c *C, basic billy.Basic)
helper/polyfill/polyfill_test.go:79
↓ 3 callersMethodtestFileSeek
(c *C, offset int64, whence int)
test/basic.go:295
↓ 3 callersFunctionwrapFile
(f billy.File, filename string)
helper/mount/mount.go:257
↓ 2 callersFunctionCapabilities
Capabilities returns the features supported by a filesystem. If the FS does not implement Capable interface it returns all features.
fs.go:196
↓ 2 callersMethodJoin
Falls back to Go's filepath.Join, which works differently depending on the OS where the code is being executed.
memfs/memory.go:186
↓ 2 callersFunctionNew
New creates a new filesystem wrapping up 'fs' the intercepts the calls to the TempFile method. The param defaultDir is used as default directory were
helper/temporal/temporal.go:17
↓ 2 callersMethodOpenFile
(filename string, flag int, perm os.FileMode)
osfs/os_bound.go:82
↓ 2 callersMethodOpenFile
(filename string, flag int, perm os.FileMode)
osfs/os_chroot.go:44
↓ 2 callersMethodOpenFile
(filename string, flag int, perm os.FileMode)
memfs/memory.go:46
↓ 2 callersMethodRead
(b []byte)
memfs/memory.go:243
↓ 2 callersMethodReadAt
(b []byte, off int64)
memfs/memory.go:254
↓ 2 callersMethodTruncate
Truncate the file.
fs.go:185
↓ 2 callersMethodUnwrap
()
helper/iofs/iofs_test.go:18
↓ 2 callersFunctionWithBoundOS
WithBoundOS returns the option of using a Bound filesystem OS.
osfs/os.go:46
↓ 2 callersMethodcreateDir
(fullpath string)
osfs/os_bound.go:263
↓ 2 callersMethodcreateParent
(path string, mode os.FileMode, f *file)
memfs/storage.go:56
↓ 2 callersMethodgetDirAndPath
(path string)
helper/mount/mount.go:183
↓ 2 callersFunctiongetTempDir
(fs billy.Basic)
util/util.go:225
next →1–100 of 567, ranked by callers