blob: 67f73f0cbc92730923f4403541cdb507d600c011 [file]
// Copyright 2026 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.actions;
/** A simple interface for file artifact metadata to decouple from the execution graph. */
public interface FileArtifactMetadata extends HasDigest {
/** Returns whether the file contents exist remotely. */
boolean isRemote();
/** Returns the location index for remote files. For non-remote files, returns 0. */
int getLocationIndex();
/** Returns the file's size, or 0 if the underlying file system object is not a file. */
// TODO(ulfjack): Throw an exception if it's not a file.
long getSize();
}