- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 184 for xreaddir (0.24 sec)
-
src/cmd/dist/util.go
func xremoveall(p string) { if vflag > 2 { errprintf("rm -r %s\n", p) } os.RemoveAll(p) } // xreaddir replaces dst with a list of the names of the files and subdirectories in dir. // The names are relative to dir; they are not full paths. func xreaddir(dir string) []string { f, err := os.Open(dir) if err != nil { fatalf("%v", err) } defer f.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 23 17:50:29 UTC 2023 - 11.2K bytes - Viewed (0) -
src/cmd/dist/build.go
xmkdir(p) } goosGoarch := pathf("%s/pkg/%s_%s", goroot, gohostos, gohostarch) if rebuildall { xremoveall(goosGoarch) } xmkdirall(goosGoarch) xatexit(func() { if files := xreaddir(goosGoarch); len(files) == 0 { xremove(goosGoarch) } }) if goos != gohostos || goarch != gohostarch { p := pathf("%s/pkg/%s_%s", goroot, goos, goarch) if rebuildall { xremoveall(p) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:34:40 UTC 2024 - 54K bytes - Viewed (0) -
cmd/os-readdir-common.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package cmd // Options for readDir function call type readDirOpts struct { // The maximum number of entries to return count int // Follow directory symlink followDirSymlink bool } // Return all the entries at the directory dirPath. func readDir(dirPath string) (entries []string, err error) { return readDirWithOpts(dirPath, readDirOpts{count: -1}) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jul 09 23:20:51 UTC 2021 - 1.3K bytes - Viewed (0) -
src/io/fs/readdir.go
// that provides an optimized implementation of [ReadDir]. type ReadDirFS interface { FS // ReadDir reads the named directory // and returns a list of directory entries sorted by filename. ReadDir(name string) ([]DirEntry, error) } // ReadDir reads the named directory // and returns a list of directory entries sorted by filename. // // If fs implements [ReadDirFS], ReadDir calls fs.ReadDir.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 1.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/arch/x86/x86asm/tables.go
/*6587*/ uint16(xReadIb), /*6588*/ uint16(xArgRM16), /*6589*/ uint16(xArgImm8u), /*6590*/ uint16(xMatch), /*6591*/ uint16(xSetOp), uint16(BTR), /*6593*/ uint16(xReadIb), /*6594*/ uint16(xArgRM32), /*6595*/ uint16(xArgImm8u), /*6596*/ uint16(xMatch), /*6597*/ uint16(xCondDataSize), 6585, 6591, 6601, /*6601*/ uint16(xSetOp), uint16(BTR), /*6603*/ uint16(xReadIb), /*6604*/ uint16(xArgRM64),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 16 22:24:28 UTC 2022 - 266.8K bytes - Viewed (0) -
cmd/is-dir-empty_linux.go
func isDirEmpty(dirname string, legacy bool) bool { if legacy { // On filesystems such as btrfs, nfs this is not true, so fallback // to performing readdir() instead. entries, err := readDirN(dirname, 1) if err != nil { return false } return len(entries) == 0 } var stat syscall.Stat_t if err := syscall.Stat(dirname, &stat); err != nil { return false }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Apr 05 15:17:08 UTC 2024 - 1.4K bytes - Viewed (0) -
cmd/os-readdir_test.go
// Check non existent directory. if _, err := readDir("/tmp/non-existent-directory"); err != errFileNotFound { t.Fatalf("expected = %s, got: %s", errFileNotFound, err) } file := path.Join(os.TempDir(), "issue") if err := os.WriteFile(file, []byte(""), 0o644); err != nil { t.Fatal(err) } defer os.RemoveAll(file) // Check if file is given. if _, err := readDir(path.Join(file, "mydir")); err != errFileNotFound {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 7.5K bytes - Viewed (0) -
src/os/dir.go
func (f *File) Readdir(n int) ([]FileInfo, error) { if f == nil { return nil, ErrInvalid } _, _, infos, err := f.readdir(n, readdirFileInfo) if infos == nil { // Readdir has historically always returned a non-nil empty slice, never nil, // even on error (except misuse with nil receiver above). // Keep it that way to avoid breaking overly sensitive callers. infos = []FileInfo{} } return infos, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 6.1K bytes - Viewed (0) -
src/net/http/example_filesystem_test.go
// It is used to wrap the Readdir method of http.File so that we can // remove files and directories that start with a period from its output. type dotFileHidingFile struct { http.File } // Readdir is a wrapper around the Readdir method of the embedded File // that filters out all files that start with a period in their name. func (f dotFileHidingFile) Readdir(n int) (fis []fs.FileInfo, err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 02:32:42 UTC 2020 - 2K bytes - Viewed (0) -
src/os/dir_plan9.go
d.bufp, d.nbuf = 0, nb if err != nil { if err == io.EOF { break } return names, dirents, infos, &PathError{Op: "readdir", Path: file.name, Err: err} } if nb < syscall.STATFIXLEN { return names, dirents, infos, &PathError{Op: "readdir", Path: file.name, Err: syscall.ErrShortStat} } } // Get a record from the buffer. b := d.buf[d.bufp:]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 20:52:06 UTC 2024 - 2.1K bytes - Viewed (0)