Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for readDirFn (0.25 sec)

  1. cmd/os_windows.go

    	// baseDir is not honored in windows platform
    	return os.MkdirAll(dirPath, perm)
    }
    
    // readDirFn applies the fn() function on each entries at dirPath, doesn't recurse into
    // the directory itself, if the dirPath doesn't exist this function doesn't return
    // an error.
    func readDirFn(dirPath string, filter func(name string, typ os.FileMode) error) error {
    	// Ensure we don't pick up files as directories.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  2. cmd/storage-errors.go

    var errMoreData = StorageErr("more data was sent than what was advertised")
    
    // indicates readDirFn to return without further applying the fn()
    var errDoneForNow = errors.New("done for now")
    
    // errSkipFile returned by the fn() for readDirFn() when it needs
    // to proceed to next entry.
    var errSkipFile = errors.New("skip this file")
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. cmd/os_other.go

    	// baseDir is not honored in plan9 and solaris platforms.
    	return os.MkdirAll(dirPath, perm)
    }
    
    // readDirFn applies the fn() function on each entries at dirPath, doesn't recurse into
    // the directory itself, if the dirPath doesn't exist this function doesn't return
    // an error.
    func readDirFn(dirPath string, filter func(name string, typ os.FileMode) error) error {
    	d, err := Open(dirPath)
    	if err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Sep 13 15:14:36 GMT 2023
    - 4K bytes
    - Viewed (0)
  4. cmd/os_unix.go

    	if err != nil {
    		return consumed, nil, typ, err
    	}
    
    	return consumed, nameBuf[:nameLen], typ, nil
    }
    
    // readDirFn applies the fn() function on each entries at dirPath, doesn't recurse into
    // the directory itself, if the dirPath doesn't exist this function doesn't return
    // an error.
    func readDirFn(dirPath string, fn func(name string, typ os.FileMode) error) error {
    	fd, err := openFileWithFD(dirPath, readMode, 0o666)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  5. cmd/erasure-multipart.go

    func (er erasureObjects) cleanupStaleUploadsOnDisk(ctx context.Context, disk StorageAPI, expiry time.Duration) {
    	drivePath := disk.Endpoint().Path
    
    	readDirFn(pathJoin(drivePath, minioMetaMultipartBucket), func(shaDir string, typ os.FileMode) error {
    		readDirFn(pathJoin(drivePath, minioMetaMultipartBucket, shaDir), func(uploadIDDir string, typ os.FileMode) error {
    			uploadIDPath := pathJoin(shaDir, uploadIDDir)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 42.4K bytes
    - Viewed (0)
  6. cmd/metacache-server-pool.go

    )
    
    func renameAllBucketMetacache(epPath string) error {
    	// Rename all previous `.minio.sys/buckets/<bucketname>/.metacache` to
    	// to `.minio.sys/tmp/` for deletion.
    	return readDirFn(pathJoin(epPath, minioMetaBucket, bucketMetaPrefix), func(name string, typ os.FileMode) error {
    		if typ == os.ModeDir {
    			tmpMetacacheOld := pathutil.Join(epPath, minioMetaTmpDeletedBucket, mustGetUUID())
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  7. cmd/erasure.go

    	for _, disk := range er.getLocalDisks() {
    		if disk == nil {
    			continue
    		}
    		wg.Add(1)
    		go func(disk StorageAPI) {
    			defer wg.Done()
    			drivePath := disk.Endpoint().Path
    			readDirFn(pathJoin(drivePath, minioMetaTmpDeletedBucket), func(ddir string, typ os.FileMode) error {
    				w := xioutil.NewDeadlineWorker(globalDriveConfig.GetMaxTimeout())
    				return w.Run(func() error {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 10:02:39 GMT 2024
    - 16K bytes
    - Viewed (1)
  8. cmd/data-scanner.go

    		}
    
    		if f.weSleep() {
    			scannerSleeper.Sleep(ctx, dataScannerSleepPerFolder)
    		}
    
    		var existingFolders, newFolders []cachedFolder
    		var foundObjects bool
    		err := readDirFn(pathJoin(f.root, folder.name), func(entName string, typ os.FileMode) error {
    			// Parse
    			entName = pathClean(pathJoin(folder.name, entName))
    			if entName == "" || entName == folder.name {
    				if f.dataUsageScannerDebug {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 09:40:19 GMT 2024
    - 46.9K bytes
    - Viewed (0)
  9. cmd/xl-storage.go

    	if !isXL2V1Format(buf) {
    		return nil
    	}
    	var xl xlMetaV2
    	err = xl.LoadOrConvert(buf)
    	if err != nil {
    		return err
    	}
    	foundDirs := make(map[string]struct{}, len(xl.versions))
    	err = readDirFn(baseDir, func(name string, typ os.FileMode) error {
    		if !typ.IsDir() {
    			return nil
    		}
    		// See if directory has a UUID name.
    		base := filepath.Base(name)
    		_, err := uuid.Parse(base)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 82.4K bytes
    - Viewed (0)
  10. 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
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 05 15:17:08 GMT 2024
    - 1.4K bytes
    - Viewed (0)
Back to top