func (ds *DiskStorage) blobDirectory(partition string, b *blobref.BlobRef) string { d := b.Digest() if len(d) < 6 { d = d + "______" } return filepath.Join(ds.PartitionRoot(partition), b.HashName(), d[0:3], d[3:6]) }
func BlobFileName(b *blobref.BlobRef) string { return fmt.Sprintf("%s/%s-%s.dat", BlobDirectoryName(b), b.HashName(), b.Digest()) }
func BlobDirectoryName(b *blobref.BlobRef) string { d := b.Digest() return fmt.Sprintf("%s/%s/%s/%s", *flagStorageRoot, b.HashName(), d[0:3], d[3:6]) }
func BlobFileBaseName(b *blobref.BlobRef) string { return fmt.Sprintf("%s-%s.dat", b.HashName(), b.Digest()) }