Reference documentation and code samples for the Google Cloud Security Command Center V1 Client class File.
File information about the related binary/library used by an executable, or
the script used by a script interpreter
Generated from protobuf messagegoogle.cloud.securitycenter.v1.File
Namespace
Google \ Cloud \ SecurityCenter \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ path
string
Absolute path of the file as a JSON encoded string.
↳ size
int|string
Size of the file in bytes.
↳ sha256
string
SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.
↳ hashed_size
int|string
The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.
↳ partially_hashed
bool
True when the hash covers only a prefix of the file.
↳ contents
string
Prefix of the file contents as a JSON-encoded string.
Path of the file in terms of underlying disk/partition identifiers.
getPath
Absolute path of the file as a JSON encoded string.
Returns
Type
Description
string
setPath
Absolute path of the file as a JSON encoded string.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSize
Size of the file in bytes.
Returns
Type
Description
int|string
setSize
Size of the file in bytes.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getSha256
SHA256 hash of the first hashed_size bytes of the file encoded as a
hex string. If hashed_size == size, sha256 represents the SHA256 hash
of the entire file.
Returns
Type
Description
string
setSha256
SHA256 hash of the first hashed_size bytes of the file encoded as a
hex string. If hashed_size == size, sha256 represents the SHA256 hash
of the entire file.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getHashedSize
The length in bytes of the file prefix that was hashed. If
hashed_size == size, any hashes reported represent the entire
file.
Returns
Type
Description
int|string
setHashedSize
The length in bytes of the file prefix that was hashed. If
hashed_size == size, any hashes reported represent the entire
file.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getPartiallyHashed
True when the hash covers only a prefix of the file.
Returns
Type
Description
bool
setPartiallyHashed
True when the hash covers only a prefix of the file.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getContents
Prefix of the file contents as a JSON-encoded string.
Returns
Type
Description
string
setContents
Prefix of the file contents as a JSON-encoded string.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDiskPath
Path of the file in terms of underlying disk/partition identifiers.
[[["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 Security Command Center V1 Client - Class File (2.2.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.1 (latest)](/php/docs/reference/cloud-security-center/latest/V1.File)\n- [2.2.0](/php/docs/reference/cloud-security-center/2.2.0/V1.File)\n- [2.1.1](/php/docs/reference/cloud-security-center/2.1.1/V1.File)\n- [2.0.4](/php/docs/reference/cloud-security-center/2.0.4/V1.File)\n- [1.32.0](/php/docs/reference/cloud-security-center/1.32.0/V1.File)\n- [1.31.0](/php/docs/reference/cloud-security-center/1.31.0/V1.File)\n- [1.30.0](/php/docs/reference/cloud-security-center/1.30.0/V1.File)\n- [1.29.0](/php/docs/reference/cloud-security-center/1.29.0/V1.File)\n- [1.28.2](/php/docs/reference/cloud-security-center/1.28.2/V1.File)\n- [1.21.0](/php/docs/reference/cloud-security-center/1.21.0/V1.File)\n- [1.20.2](/php/docs/reference/cloud-security-center/1.20.2/V1.File)\n- [1.19.1](/php/docs/reference/cloud-security-center/1.19.1/V1.File)\n- [1.18.0](/php/docs/reference/cloud-security-center/1.18.0/V1.File)\n- [1.17.0](/php/docs/reference/cloud-security-center/1.17.0/V1.File)\n- [1.16.0](/php/docs/reference/cloud-security-center/1.16.0/V1.File)\n- [1.15.1](/php/docs/reference/cloud-security-center/1.15.1/V1.File)\n- [1.14.2](/php/docs/reference/cloud-security-center/1.14.2/V1.File)\n- [1.13.1](/php/docs/reference/cloud-security-center/1.13.1/V1.File) \nReference documentation and code samples for the Google Cloud Security Command Center V1 Client class File.\n\nFile information about the related binary/library used by an executable, or\nthe script used by a script interpreter\n\nGenerated from protobuf message `google.cloud.securitycenter.v1.File`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ SecurityCenter \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPath\n\nAbsolute path of the file as a JSON encoded string.\n\n### setPath\n\nAbsolute path of the file as a JSON encoded string.\n\n### getSize\n\nSize of the file in bytes.\n\n### setSize\n\nSize of the file in bytes.\n\n### getSha256\n\nSHA256 hash of the first hashed_size bytes of the file encoded as a\nhex string. If hashed_size == size, sha256 represents the SHA256 hash\nof the entire file.\n\n### setSha256\n\nSHA256 hash of the first hashed_size bytes of the file encoded as a\nhex string. If hashed_size == size, sha256 represents the SHA256 hash\nof the entire file.\n\n### getHashedSize\n\nThe length in bytes of the file prefix that was hashed. If\nhashed_size == size, any hashes reported represent the entire\nfile.\n\n### setHashedSize\n\nThe length in bytes of the file prefix that was hashed. If\nhashed_size == size, any hashes reported represent the entire\nfile.\n\n### getPartiallyHashed\n\nTrue when the hash covers only a prefix of the file.\n\n### setPartiallyHashed\n\nTrue when the hash covers only a prefix of the file.\n\n### getContents\n\nPrefix of the file contents as a JSON-encoded string.\n\n### setContents\n\nPrefix of the file contents as a JSON-encoded string.\n\n### getDiskPath\n\nPath of the file in terms of underlying disk/partition identifiers.\n\n### hasDiskPath\n\n### clearDiskPath\n\n### setDiskPath\n\nPath of the file in terms of underlying disk/partition identifiers."]]