Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for ToFileInfo (0.14 sec)

  1. cmd/xl-storage-free-version_test.go

    		expectedFree bool
    		expectedErr  error
    	}{
    		// ToFileInfo with 'inclFreeVers = true' should return the latest
    		// non-free version if one is present
    		{
    			vol:          newtierfi.Volume,
    			name:         newtierfi.Name,
    			inclFreeVers: true,
    			afterFn:      xl.DeleteVersion,
    			expectedFree: false,
    		},
    		// ToFileInfo with 'inclFreeVers = true' must return the latest free
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Mar 02 05:11:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  2. cmd/xl-storage-format-v2.go

    	}
    	return [16]byte{}
    }
    
    // ToFileInfo returns FileInfo of the underlying type.
    func (j *xlMetaV2Version) ToFileInfo(volume, path string, allParts bool) (fi FileInfo, err error) {
    	if j == nil {
    		return fi, errFileNotFound
    	}
    	switch j.Type {
    	case ObjectType:
    		fi, err = j.ObjectV2.ToFileInfo(volume, path, allParts)
    	case DeleteType:
    		fi, err = j.DeleteMarker.ToFileInfo(volume, path)
    	case LegacyType:
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 64K bytes
    - Viewed (1)
  3. cmd/xl-storage-format-utils.go

    	var fi FileInfo
    	var err error
    	var inData xlMetaInlineData
    	if buf, data, e := isIndexedMetaV2(xlMetaBuf); e != nil {
    		return FileInfo{}, e
    	} else if buf != nil {
    		inData = data
    		fi, err = buf.ToFileInfo(volume, path, versionID, true)
    		if len(buf) != 0 && errors.Is(err, errFileNotFound) {
    			// This special case is needed to handle len(xlMeta.versions) == 0
    			return FileInfo{
    				Volume:    volume,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. cmd/xl-storage-format_test.go

    						b.Fatal(err)
    					}
    				}
    			})
    			b.Run("ToFileInfo", func(b *testing.B) {
    				b.SetBytes(int64(size))
    				b.ResetTimer()
    				b.ReportAllocs()
    				for i := 0; i < b.N; i++ {
    					// Load...
    					xl = xlMetaV2{}
    					err := xl.Load(enc)
    					if err != nil {
    						b.Fatal(err)
    					}
    					// List...
    					_, err = xl.ToFileInfo("volume", "path", ids[rng.Intn(size)], false, true)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  5. cmd/xl-storage-format-v2_test.go

    				Hash:       nil,
    			}},
    		},
    		NumVersions: 1,
    	}
    
    	fi.SetHealing()
    	failOnErr(xl.AddVersion(fi))
    
    	var err error
    	fi, err = xl.ToFileInfo(fi.Volume, fi.Name, fi.VersionID, false, true)
    	if err != nil {
    		t.Fatalf("xl.ToFileInfo failed with %v", err)
    	}
    
    	if fi.Healing() {
    		t.Fatal("Expected fi.Healing to be false")
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Mar 08 17:50:48 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  6. cmd/xl-storage-format-v1.go

    		return errBitrotHashAlgoInvalid
    	}
    	return nil
    }
    
    // constant and shouldn't be changed.
    const (
    	legacyDataDir = "legacy"
    )
    
    func (m *xlMetaV1Object) ToFileInfo(volume, path string) (FileInfo, error) {
    	if !m.valid() {
    		return FileInfo{}, errFileCorrupt
    	}
    
    	fi := FileInfo{
    		Volume:      volume,
    		Name:        path,
    		ModTime:     m.Stat.ModTime,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. cmd/metacache-entries.go

    			return FileInfo{
    				Volume:   bucket,
    				Name:     e.name,
    				Deleted:  true,
    				IsLatest: true,
    				ModTime:  timeSentinel1970,
    			}, nil
    		}
    		return e.cached.ToFileInfo(bucket, e.name, "", false, true)
    	}
    	return getFileInfo(e.metadata, bucket, e.name, "", fileInfoOpts{})
    }
    
    // xlmeta returns the decoded metadata.
    // This should not be called on directories.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  8. cmd/erasure-object.go

    		}
    	}
    
    	readQuorum := (len(rawFileInfos) + 1) / 2
    	meta := &xlMetaV2{versions: mergeXLV2Versions(readQuorum, false, 1, metadataShallowVersions...)}
    	lfi, err := meta.ToFileInfo(bucket, object, "", inclFreeVers, true)
    	if err != nil {
    		for i := range errs {
    			if errs[i] == nil {
    				errs[i] = err
    			}
    		}
    		return metaFileInfos, errs
    	}
    	if !lfi.IsValid() {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 78.8K bytes
    - Viewed (0)
Back to top