Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for nonempty (0.18 sec)

  1. cmd/xl-storage-errors_test.go

    	if !ok {
    		t.Fatalf("Unexpected error expecting %s", syscall.ENOTDIR)
    	}
    	if runtime.GOOS != globalWindowsOSName {
    		pathErr = &os.PathError{Err: syscall.ENOTEMPTY}
    		ok = isSysErrNotEmpty(pathErr)
    		if !ok {
    			t.Fatalf("Unexpected error expecting %s", syscall.ENOTEMPTY)
    		}
    	} else {
    		pathErr = &os.PathError{Err: syscall.Errno(0x91)}
    		ok = isSysErrNotEmpty(pathErr)
    		if !ok {
    			t.Fatal("Unexpected error expecting 0x91")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 1.7K bytes
    - Viewed (0)
  2. cmd/xl-storage-errors.go

    func isSysErrTooManySymlinks(err error) bool {
    	return errors.Is(err, syscall.ELOOP)
    }
    
    // Check if the given error corresponds to ENOTEMPTY for unix,
    // EEXIST for solaris variants,
    // and ERROR_DIR_NOT_EMPTY for windows (directory not empty).
    func isSysErrNotEmpty(err error) bool {
    	if errors.Is(err, syscall.ENOTEMPTY) {
    		return true
    	}
    	if errors.Is(err, syscall.EEXIST) && runtime.GOOS == "solaris" {
    		return true
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 06 16:56:29 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  3. cmd/os-reliable.go

    			// directory" error message. Handle this specifically
    			// here.
    			return errFileAccessDenied
    		}
    	}
    	return err
    }
    
    // Reliably retries os.RemoveAll if for some reason os.RemoveAll returns
    // syscall.ENOTEMPTY (children has files).
    func reliableRemoveAll(dirPath string) (err error) {
    	i := 0
    	for {
    		// Removes all the directories and files.
    		if err = RemoveAll(dirPath); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  4. cmd/xl-storage_test.go

    	if err = xlStorage.MakeVol(context.Background(), "success-vol"); err != nil {
    		t.Fatalf("Unable to create volume, %s", err)
    	}
    
    	// TestXLStorage failure cases.
    	vol := slashpath.Join(path, "nonempty-vol")
    	if err = os.Mkdir(vol, 0o777); err != nil {
    		t.Fatalf("Unable to create directory, %s", err)
    	}
    	if err = os.WriteFile(slashpath.Join(vol, "test-file"), []byte{}, os.ModePerm); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 17:45:28 GMT 2024
    - 66.7K bytes
    - Viewed (0)
Back to top