Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 88 for walkDir (0.35 sec)

  1. src/io/fs/walk.go

    //
    // The error result returned by the function controls how [WalkDir]
    // continues. If the function returns the special value [SkipDir], WalkDir
    // skips the current directory (path if d.IsDir() is true, otherwise
    // path's parent directory). If the function returns the special value
    // [SkipAll], WalkDir skips all remaining files and directories. Otherwise,
    // if the function returns a non-nil error, WalkDir stops entirely and
    // returns that error.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 09 08:50:19 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. cmd/metacache-walk.go

    	DiskID string
    }
    
    // supported FS for Nlink optimization in readdir.
    const (
    	xfs  = "XFS"
    	ext4 = "EXT4"
    )
    
    // WalkDir will traverse a directory and return all entries found.
    // On success a sorted meta cache stream will be returned.
    // Metadata has data stripped, if any.
    func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writer) (err error) {
    	legacyFS := !(s.fsType == xfs || s.fsType == ext4)
    
    	s.RLock()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Jun 01 05:17:37 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  3. src/path/filepath/path.go

    //
    // WalkDir does not follow symbolic links.
    //
    // WalkDir calls fn with paths that use the separator character appropriate
    // for the operating system. This is unlike [io/fs.WalkDir], which always
    // uses slash separated paths.
    func WalkDir(root string, fn fs.WalkDirFunc) error {
    	info, err := os.Lstat(root)
    	if err != nil {
    		err = fn(root, nil, err)
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  4. platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/collections/DirectoryFileTree.java

            if (fileOrDirectory.exists()) {
                if (fileOrDirectory.isFile()) {
                    processSingleFile(fileOrDirectory, visitor, spec, stopFlag);
                } else {
                    walkDir(fileOrDirectory, path, visitor, spec, stopFlag);
                }
            } else {
                LOGGER.info("file or directory '{}', not found", fileOrDirectory);
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Feb 15 21:33:45 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  5. src/go/internal/srcimporter/srcimporter_test.go

    		}
    		return
    	}
    	t.Logf("import %q: %v", path, time.Since(t0))
    }
    
    // walkDir imports the all the packages with the given path
    // prefix recursively. It returns the number of packages
    // imported and whether importing was aborted because time
    // has passed endTime.
    func walkDir(t *testing.T, path string, endTime time.Time) (int, bool) {
    	if time.Now().After(endTime) {
    		t.Log("testing time used up")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  6. src/cmd/fix/main.go

    		return "<" + err.Error() + ">"
    	}
    	return gofmtBuf.String()
    }
    
    func report(err error) {
    	scanner.PrintError(os.Stderr, err)
    	exitCode = 2
    }
    
    func walkDir(path string) {
    	filepath.WalkDir(path, visitFile)
    }
    
    func visitFile(path string, f fs.DirEntry, err error) error {
    	if err == nil && isGoFile(f) {
    		err = processFile(path, false)
    	}
    	if err != nil {
    		report(err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  7. src/cmd/go/internal/vcweb/vcstest/vcstest_test.go

    		resp, err := http.Get(srv.URL)
    		if err == nil {
    			io.Copy(io.Discard, resp.Body)
    			resp.Body.Close()
    		} else {
    			t.Error(err)
    		}
    	})
    
    	t.Cleanup(func() {
    		// The subtests spawned by WalkDir run in parallel. When they complete, this
    		// Cleanup callback will run. At that point we fetch the root URL (which
    		// contains a status page), both to test that the root handler runs without
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 11 16:04:21 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  8. src/io/fs/example_test.go

    package fs_test
    
    import (
    	"fmt"
    	"io/fs"
    	"log"
    	"os"
    )
    
    func ExampleWalkDir() {
    	root := "/usr/local/go/bin"
    	fileSystem := os.DirFS(root)
    
    	fs.WalkDir(fileSystem, ".", func(path string, d fs.DirEntry, err error) error {
    		if err != nil {
    			log.Fatal(err)
    		}
    		fmt.Println(path)
    		return nil
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 21 03:21:56 UTC 2021
    - 462 bytes
    - Viewed (0)
  9. platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/collections/DirectoryWalker.java

    import org.gradle.api.file.RelativePath;
    import org.gradle.api.specs.Spec;
    
    import java.nio.file.Path;
    import java.util.concurrent.atomic.AtomicBoolean;
    
    public interface DirectoryWalker {
        void walkDir(Path rootDir, RelativePath rootPath, FileVisitor visitor, Spec<? super FileTreeElement> spec, AtomicBoolean stopFlag, boolean postfix);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  10. src/io/fs/walk_test.go

    	fsys := makeTree()
    	errors := make([]error, 0, 10)
    	clear := true
    	markFn := func(path string, entry DirEntry, err error) error {
    		return mark(entry, err, &errors, clear)
    	}
    	// Expect no errors.
    	err = WalkDir(fsys, ".", markFn)
    	if err != nil {
    		t.Fatalf("no error expected, found: %s", err)
    	}
    	if len(errors) != 0 {
    		t.Fatalf("unexpected errors: %s", errors)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 15:21:18 UTC 2022
    - 3K bytes
    - Viewed (0)
Back to top