Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for WalkDir (0.17 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()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  2. lib/time/mkzip.go

    	flag.Parse()
    	args := flag.Args()
    	if len(args) != 1 || !strings.HasSuffix(args[0], ".zip") {
    		usage()
    	}
    
    	var zb bytes.Buffer
    	zw := zip.NewWriter(&zb)
    	seen := make(map[string]bool)
    	err := filepath.WalkDir(".", func(path string, d fs.DirEntry, err error) error {
    		if d.IsDir() {
    			return nil
    		}
    		data, err := os.ReadFile(path)
    		if err != nil {
    			log.Fatal(err)
    		}
    		if strings.HasSuffix(path, ".zip") {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 17:32:07 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. 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
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  4. 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) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  5. 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,
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 18 04:42:11 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  6. misc/go_android_exec/main.go

    			// contains nested modules this could push a lot of unnecessary contents,
    			// but for the golang.org/x repos it seems to be significantly (~2x)
    			// faster than copying one file at a time (via filepath.WalkDir),
    			// apparently due to high latency in 'adb' commands.
    			if err := adb("push", modDir, deviceModDir); err != nil {
    				return 0, err
    			}
    		} else {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  7. src/archive/zip/writer.go

    // It walks the directory tree starting at the root of the filesystem
    // adding each file to the zip using deflate while maintaining the directory structure.
    func (w *Writer) AddFS(fsys fs.FS) error {
    	return fs.WalkDir(fsys, ".", func(name string, d fs.DirEntry, err error) error {
    		if err != nil {
    			return err
    		}
    		if d.IsDir() {
    			return nil
    		}
    		info, err := d.Info()
    		if err != nil {
    			return err
    		}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  8. src/archive/tar/writer.go

    // It walks the directory tree starting at the root of the filesystem
    // adding each file to the tar archive while maintaining the directory structure.
    func (tw *Writer) AddFS(fsys fs.FS) error {
    	return fs.WalkDir(fsys, ".", func(name string, d fs.DirEntry, err error) error {
    		if err != nil {
    			return err
    		}
    		if d.IsDir() {
    			return nil
    		}
    		info, err := d.Info()
    		if err != nil {
    			return err
    		}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  9. src/archive/zip/reader_test.go

    			var files []string
    			sawErr := false
    			err = fs.WalkDir(z, ".", func(path string, d fs.DirEntry, err error) error {
    				if err != nil {
    					if !test.wantErr {
    						t.Errorf("%s: %v", path, err)
    					}
    					sawErr = true
    					return nil
    				}
    				files = append(files, path)
    				return nil
    			})
    			if err != nil {
    				t.Errorf("fs.WalkDir error: %v", err)
    			}
    			if test.wantErr && !sawErr {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  10. api/go1.16.txt

    pkg io/fs, func ReadFile(FS, string) ([]uint8, error)
    pkg io/fs, func Stat(FS, string) (FileInfo, error)
    pkg io/fs, func Sub(FS, string) (FS, error)
    pkg io/fs, func ValidPath(string) bool
    pkg io/fs, func WalkDir(FS, string, WalkDirFunc) error
    pkg io/fs, method (*PathError) Error() string
    pkg io/fs, method (*PathError) Timeout() bool
    pkg io/fs, method (*PathError) Unwrap() error
    pkg io/fs, method (FileMode) IsDir() bool
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Dec 02 16:30:41 GMT 2022
    - 479.2K bytes
    - Viewed (0)
Back to top