Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for walkDir (0.59 sec)

  1. 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)
  2. 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)
  3. 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)
  4. cmd/storage-interface.go

    	StatVol(ctx context.Context, volume string) (vol VolInfo, err error)
    	DeleteVol(ctx context.Context, volume string, forceDelete bool) (err error)
    
    	// WalkDir will walk a directory on disk and return a metacache stream on wr.
    	WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writer) error
    
    	// Metadata operations
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 5K bytes
    - Viewed (0)
  5. src/compress/gzip/issue14937_test.go

    		t.Skip("skipping; no GOROOT available")
    	}
    
    	goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
    	if err != nil {
    		t.Fatal("error evaluating GOROOT: ", err)
    	}
    	var files []string
    	err = filepath.WalkDir(goroot, func(path string, info fs.DirEntry, err error) error {
    		if err != nil {
    			return err
    		}
    		if !info.IsDir() && strings.HasSuffix(path, ".gz") {
    			files = append(files, path)
    		}
    		return nil
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 10 16:37:53 UTC 2024
    - 2K bytes
    - Viewed (0)
  6. cmd/naughty-disk_test.go

    	if err := d.calcError(); err != nil {
    		return err
    	}
    	return d.disk.DeleteVol(ctx, volume, forceDelete)
    }
    
    func (d *naughtyDisk) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writer) error {
    	if err := d.calcError(); err != nil {
    		return err
    	}
    	return d.disk.WalkDir(ctx, opts, wr)
    }
    
    func (d *naughtyDisk) ListDir(ctx context.Context, origvolume, volume, dirPath string, count int) (entries []string, err error) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  7. src/os/dir.go

    // to ErrInvalid is returned on symlink.
    //
    // Copying stops at and returns the first error encountered.
    func CopyFS(dir string, fsys fs.FS) error {
    	return fs.WalkDir(fsys, ".", func(path string, d fs.DirEntry, err error) error {
    		if err != nil {
    			return err
    		}
    
    		fpath, err := filepathlite.Localize(path)
    		if err != nil {
    			return 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)
  8. src/cmd/gofmt/gofmt.go

    		}
    		in = f
    		defer func() {
    			f.Close()
    			<-fdSem
    		}()
    	}
    
    	// Compute the file's size and read its contents with minimal allocations.
    	//
    	// If we have the FileInfo from filepath.WalkDir, use it to make
    	// a buffer of the right size and avoid ReadAll's reallocations.
    	//
    	// If the size is unknown (or bogus, or overflows an int), fall back to
    	// a size-independent ReadAll.
    	size := -1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  9. src/cmd/go/internal/toolchain/select.go

    			base.Fatalf("download %s: %v", gotoolchain, err)
    		}
    		if info.Mode()&0111 == 0 {
    			// allowExec sets the exec permission bits on all files found in dir.
    			allowExec := func(dir string) {
    				err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
    					if err != nil {
    						return err
    					}
    					if !d.IsDir() {
    						info, err := os.Stat(path)
    						if err != nil {
    							return err
    						}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:25:05 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  10. cmd/metacache-set.go

    		readers[i] = newMetacacheReader(r)
    		d := disks[i]
    
    		// Send request to each disk.
    		go func() {
    			var werr error
    			if d == nil {
    				werr = errDiskNotFound
    			} else {
    				werr = d.WalkDir(ctx, WalkDirOptions{
    					Limit:          opts.perDiskLimit,
    					Bucket:         opts.bucket,
    					BaseDir:        opts.path,
    					Recursive:      opts.recursive,
    					ReportNotFound: opts.reportNotFound,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 22:18:44 UTC 2024
    - 30.4K bytes
    - Viewed (0)
Back to top