- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 198 for Readdir (0.1 sec)
-
src/testing/fstest/mapfs.go
return fs.ReadFile(fsOnly{fsys}, name) } func (fsys MapFS) Stat(name string) (fs.FileInfo, error) { return fs.Stat(fsOnly{fsys}, name) } func (fsys MapFS) ReadDir(name string) ([]fs.DirEntry, error) { return fs.ReadDir(fsOnly{fsys}, name) } func (fsys MapFS) Glob(pattern string) ([]string, error) { return fs.Glob(fsOnly{fsys}, pattern) } type noSub struct { MapFS }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 7.1K bytes - Viewed (0) -
src/image/gif/fuzz_test.go
import ( "bytes" "image" "os" "path/filepath" "strings" "testing" ) func FuzzDecode(f *testing.F) { if testing.Short() { f.Skip("Skipping in short mode") } testdata, err := os.ReadDir("../testdata") if err != nil { f.Fatalf("failed to read testdata directory: %s", err) } for _, de := range testdata { if de.IsDir() || !strings.HasSuffix(de.Name(), ".gif") { continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 27 15:57:34 UTC 2022 - 1.4K bytes - Viewed (0) -
cni/pkg/install/binaries.go
// and returns a set of the filenames copied. func copyBinaries(srcDir string, targetDirs []string) (sets.String, error) { copiedFilenames := sets.String{} srcFiles, err := os.ReadDir(srcDir) if err != nil { return copiedFilenames, err } for _, f := range srcFiles { if f.IsDir() { continue } filename := f.Name() srcFilepath := filepath.Join(srcDir, filename)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Dec 11 19:10:54 UTC 2023 - 1.5K bytes - Viewed (0) -
pkg/kubelet/logs/container_log_manager_test.go
}() // This is a blocking call. But the above routine takes care of ensuring that this is terminated once the queue is shutdown c.processQueueItems(ctx, 1) timestamp := now.Format(timestampFormat) logs, err := os.ReadDir(dir) require.NoError(t, err) assert.Len(t, logs, 5) assert.Equal(t, testLogs[0], logs[0].Name()) assert.Equal(t, testLogs[1]+"."+timestamp, logs[1].Name()) assert.Equal(t, testLogs[4]+compressSuffix, logs[2].Name())
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 12.7K bytes - Viewed (0) -
src/embed/internal/embedtest/embed_test.go
t.Helper() dirs, err := f.ReadDir(name) if err != nil { t.Error(err) return } var names []string for _, d := range dirs { name := d.Name() if d.IsDir() { name += "/" } names = append(names, name) } if !reflect.DeepEqual(names, expect) { t.Errorf("readdir %v = %v, want %v", name, names, expect) } } // Tests for issue 49514.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 14 20:10:16 UTC 2023 - 5.4K bytes - Viewed (0) -
src/internal/goexperiment/mkconsts.go
package main import ( "bytes" "fmt" "internal/goexperiment" "log" "os" "reflect" "strings" ) func main() { // Delete existing experiment constant files. ents, err := os.ReadDir(".") if err != nil { log.Fatal(err) } for _, ent := range ents { name := ent.Name() if !strings.HasPrefix(name, "exp_") { continue } // Check that this is definitely a generated file.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:27 UTC 2023 - 1.6K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_fuzz_cache.txt
} } -- empty/empty.go -- package empty -- contains_files/contains_files.go -- package main import ( "fmt" "path/filepath" "io/ioutil" "os" ) func main() { infos, err := ioutil.ReadDir(filepath.Clean(os.Args[1])) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } if len(infos) == 0 { os.Exit(1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 30 17:22:49 UTC 2022 - 1.9K bytes - Viewed (0) -
src/cmd/go/internal/imports/scan.go
import ( "fmt" "io/fs" "path/filepath" "sort" "strconv" "strings" "cmd/go/internal/fsys" ) func ScanDir(dir string, tags map[string]bool) ([]string, []string, error) { infos, err := fsys.ReadDir(dir) if err != nil { return nil, nil, err } var files []string for _, info := range infos { name := info.Name() // If the directory entry is a symlink, stat it to obtain the info for the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 23 19:36:38 UTC 2020 - 2.6K bytes - Viewed (0) -
src/io/ioutil/example_test.go
if err != nil { log.Fatal(err) } fmt.Printf("%s", b) // Output: // Go is a general-purpose language designed with systems programming in mind. } func ExampleReadDir() { files, err := ioutil.ReadDir(".") if err != nil { log.Fatal(err) } for _, file := range files { fmt.Println(file.Name()) } } func ExampleTempDir() { content := []byte("temporary file's content")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 22 23:03:58 UTC 2021 - 2.7K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_fuzz_minimize_interesting.txt
wantLen, err := strconv.Atoi(os.Args[2]) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } testName := os.Args[1] dir := filepath.Join("testdata/fuzz", testName) files, err := ioutil.ReadDir(dir) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } if len(files) == 0 { fmt.Fprintf(os.Stderr, "expect at least one failure to be written to testdata\n") os.Exit(1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:32 UTC 2023 - 5.5K bytes - Viewed (0)