MCPcopy Index your code
hub / github.com/cloudfoundry/cli / ToV2Resource

Method ToV2Resource

actor/sharedaction/resource.go:58–65  ·  view source on GitHub ↗

ToV2Resource converts a V3 Resource to V2 Resource format

()

Source from the content-addressed store, hash-verified

56
57// ToV2Resource converts a V3 Resource to V2 Resource format
58func (r V3Resource) ToV2Resource() Resource {
59 return Resource{
60 Filename: r.FilePath,
61 Mode: r.Mode,
62 SHA1: r.Checksum.Value,
63 Size: r.SizeInBytes,
64 }
65}
66
67// GatherArchiveResources returns a list of resources for an archive.
68func (actor Actor) GatherArchiveResources(archivePath string) ([]Resource, error) {

Callers 2

resource_test.goFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected