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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eFile\u003c/code\u003e class in the Security Command Center v2 API provides information about files, including binaries, libraries, and scripts.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionalities for message handling, comparison, cloning, and buffered operations.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eFile\u003c/code\u003e class include \u003ccode\u003eContents\u003c/code\u003e (prefix of file contents), \u003ccode\u003eDiskPath\u003c/code\u003e (path in terms of disk identifiers), \u003ccode\u003eHashedSize\u003c/code\u003e (length of the hashed file prefix), \u003ccode\u003ePartiallyHashed\u003c/code\u003e (indicates if the hash covers only a prefix), \u003ccode\u003ePath\u003c/code\u003e (absolute file path), \u003ccode\u003eSha256\u003c/code\u003e (SHA256 hash of the file), and \u003ccode\u003eSize\u003c/code\u003e (file size in bytes).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFile\u003c/code\u003e class offers two constructors, a default constructor \u003ccode\u003eFile()\u003c/code\u003e, and an overload \u003ccode\u003eFile(File other)\u003c/code\u003e to create a new instance based on an existing \u003ccode\u003eFile\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eIt has inherited members such as \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eGetType()\u003c/code\u003e, and \u003ccode\u003eToString()\u003c/code\u003e, from the base \u003ccode\u003eobject\u003c/code\u003e class, alongside namespace \u003ccode\u003eGoogle.Cloud.SecurityCenter.V2\u003c/code\u003e and assembly \u003ccode\u003eGoogle.Cloud.SecurityCenter.V2.dll\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Security Command Center v2 API - Class File (1.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.File)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/1.1.0/Google.Cloud.SecurityCenter.V2.File)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/1.0.0/Google.Cloud.SecurityCenter.V2.File) \n\n public sealed class File : IMessage\u003cFile\u003e, IEquatable\u003cFile\u003e, IDeepCloneable\u003cFile\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Security Command Center v2 API class File.\n\nFile information about the related binary/library used by an executable, or\nthe script used by a script interpreter \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e File \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[File](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.File), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[File](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.File), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[File](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.File), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.SecurityCenter.V2](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.SecurityCenter.V2.dll\n\nConstructors\n------------\n\n### File()\n\n public File()\n\n### File(File)\n\n public File(File other)\n\nProperties\n----------\n\n### Contents\n\n public string Contents { get; set; }\n\nPrefix of the file contents as a JSON-encoded string.\n\n### DiskPath\n\n public File.Types.DiskPath DiskPath { get; set; }\n\nPath of the file in terms of underlying disk/partition identifiers.\n\n### HashedSize\n\n public long HashedSize { get; set; }\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### Operations\n\n public RepeatedField\u003cFile.Types.FileOperation\u003e Operations { get; }\n\nOperation(s) performed on a file.\n\n### PartiallyHashed\n\n public bool PartiallyHashed { get; set; }\n\nTrue when the hash covers only a prefix of the file.\n\n### Path\n\n public string Path { get; set; }\n\nAbsolute path of the file as a JSON encoded string.\n\n### Sha256\n\n public string Sha256 { get; set; }\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### Size\n\n public long Size { get; set; }\n\nSize of the file in bytes."]]