func FilesystemEntryFromIDWithPath(ctx context.Context, rep repo.Repository, rootID string, consistentAttributes bool) (fs.Entry, error) {
	pathElements := strings.Split(rootID, "/")

	if len(pathElements) > 1 {
		// if a path is provided, consistentAttributes is meaningless since descending into nested path is
		// always unambiguous because parent always has full attributes.
		consistentAttributes = false
	}

	var startingEntry fs.Entry

	man, err := findSnapshotByRootObjectIDOrManifestID(ctx, rep, pathElements[0], consistentAttributes)
	if err != nil {
		return nil, err
	}

	if man != nil {
		// ID was unambiguously resolved to a snapshot, which means we have data about the root directory itself.
		startingEntry, err = SnapshotRoot(rep, man)
		if err != nil {
			return nil, err
		}
	} else {
		oid, err := object.ParseID(pathElements[0])
		if err != nil {
			return nil, errors.Wrapf(err, "can't parse object ID %v", rootID)
		}

		startingEntry = AutoDetectEntryFromObjectID(ctx, rep, oid, "")
	}

	return GetNestedEntry(ctx, startingEntry, pathElements[1:])
}
// FilesystemEntryFromIDWithPath returns a filesystem entry for the provided object ID, which
// can be a snapshot manifest ID or an object ID with path.
// If multiple snapshots match and they don't agree on root object attributes and consistentAttributes==true
// the function fails, otherwise it returns the latest of the snapshots.
FilesystemEntryFromIDWithPath returns a filesystem entry for the provided object ID, which
can be a snapshot manifest ID or an object ID with path.
If multiple snapshots match and they don't agree on root object attributes and consistentAttributes==true
the function fails, otherwise it returns the latest of the snapshots.
// FilesystemEntryFromIDWithPath returns a filesystem entry for the provided object ID which // can be a snapshot manifest ID or an object ID with path . // If multiple snapshots match and they don ' t agree on root object attributes and consistentAttributes == true // the function fails otherwise it returns the latest of the snapshots .
func FilesystemEntryFromIDWithPath(ctx context.Context, rep repo.Repository, rootID string, consistentAttributes bool) (fs.Entry, error) {
	pathElements := strings.Split(rootID, "/")
	if len(pathElements) > 1 {
		consistentAttributes = false
	}
	var startingEntry fs.Entry
	man, err := findSnapshotByRootObjectIDOrManifestID(ctx, rep, pathElements[0], consistentAttributes)
	if err != nil {
		return nil, err
	}
	if man != nil {
		startingEntry, err = SnapshotRoot(rep, man)
		if err != nil {
			return nil, err
		}
	} else {
		oid, err := object.ParseID(pathElements[0])
		if err != nil {
			return nil, errors.Wrapf(err, "can't parse object ID %v", rootID)
		}
		startingEntry = AutoDetectEntryFromObjectID(ctx, rep, oid, "")
	}
	return GetNestedEntry(ctx, startingEntry, pathElements[1:])
}
func FilesystemEntryFromIDWithPath ( ctx context . Context , rep repo . Repository , rootID string , consistentAttributes bool ) ( fs . Entry , error ) { pathElements := strings . Split ( rootID , " " ) if len ( pathElements ) > 1 { consistentAttributes = false } var startingEntry fs . Entry man , err := findSnapshotByRootObjectIDOrManifestID ( ctx , rep , pathElements [ 0 ] , consistentAttributes ) if err != nil { return nil , err } if man != nil { startingEntry , err = SnapshotRoot ( rep , man ) if err != nil { return nil , err } } else { oid , err := object . ParseID ( pathElements [ 0 ] ) if err != nil { return nil , errors . Wrapf ( err , " " , rootID ) } startingEntry = AutoDetectEntryFromObjectID ( ctx , rep , oid , " " ) } return GetNestedEntry ( ctx , startingEntry , pathElements [ 1 : ] ) }
FilesystemEntryFromIDWithPath returns a filesystem entry for the provided object ID, which
can be a snapshot manifest ID or an object ID with path.
FilesystemEntryFromIDWithPath returns a filesystem entry for the provided object ID which can be a snapshot manifest ID or an object ID with path .
// if a path is provided, consistentAttributes is meaningless since descending into nested path is // always unambiguous because parent always has full attributes. // ID was unambiguously resolved to a snapshot, which means we have data about the root directory itself.