Reference documentation and code samples for the Google Cloud Artifact Registry V1 Client class File.
Files store content that is potentially associated with Packages or Versions.
Generated from protobuf messagegoogle.devtools.artifactregistry.v1.File
Namespace
Google \ Cloud \ ArtifactRegistry \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
The name of the file, for example:projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt. If the file ID part contains slashes, they are escaped.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Artifact Registry V1 Client - Class File (1.2.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.1 (latest)](/php/docs/reference/cloud-artifact-registry/latest/V1.File)\n- [1.2.0](/php/docs/reference/cloud-artifact-registry/1.2.0/V1.File)\n- [1.1.3](/php/docs/reference/cloud-artifact-registry/1.1.3/V1.File)\n- [1.0.0](/php/docs/reference/cloud-artifact-registry/1.0.0/V1.File)\n- [0.6.5](/php/docs/reference/cloud-artifact-registry/0.6.5/V1.File)\n- [0.5.1](/php/docs/reference/cloud-artifact-registry/0.5.1/V1.File)\n- [0.4.4](/php/docs/reference/cloud-artifact-registry/0.4.4/V1.File)\n- [0.3.13](/php/docs/reference/cloud-artifact-registry/0.3.13/V1.File) \nReference documentation and code samples for the Google Cloud Artifact Registry V1 Client class File.\n\nFiles store content that is potentially associated with Packages or Versions.\n\nGenerated from protobuf message `google.devtools.artifactregistry.v1.File`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ArtifactRegistry \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nThe name of the file, for example:\n`projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.\n\nIf the file ID part contains slashes, they are escaped.\n\n### setName\n\nThe name of the file, for example:\n`projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt`.\n\nIf the file ID part contains slashes, they are escaped.\n\n### getSizeBytes\n\nThe size of the File in bytes.\n\n### setSizeBytes\n\nThe size of the File in bytes.\n\n### getHashes\n\nThe hashes of the file content.\n\n### setHashes\n\nThe hashes of the file content.\n\n### getCreateTime\n\nOutput only. The time when the File was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The time when the File was created.\n\n### getUpdateTime\n\nOutput only. The time when the File was last updated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The time when the File was last updated.\n\n### getOwner\n\nThe name of the Package or Version that owns this file, if any.\n\n### setOwner\n\nThe name of the Package or Version that owns this file, if any.\n\n### getFetchTime\n\nOutput only. The time when the last attempt to refresh the file's data was\nmade. Only set when the repository is remote.\n\n### hasFetchTime\n\n### clearFetchTime\n\n### setFetchTime\n\nOutput only. The time when the last attempt to refresh the file's data was\nmade. Only set when the repository is remote.\n\n### getAnnotations\n\nOptional. Client specified annotations.\n\n### setAnnotations\n\nOptional. Client specified annotations."]]