Class: Google::Apis::RemotebuildexecutionV1::GoogleDevtoolsRemoteexecutionV1testDirectory
- Inherits:
-
Object
- Object
- Google::Apis::RemotebuildexecutionV1::GoogleDevtoolsRemoteexecutionV1testDirectory
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/remotebuildexecution_v1/classes.rb,
generated/google/apis/remotebuildexecution_v1/representations.rb,
generated/google/apis/remotebuildexecution_v1/representations.rb
Overview
A Directory
represents a directory node in a file tree, containing zero or
more children FileNodes
and DirectoryNodes.
Each Node
contains its name in the directory, the digest of its content
(either a file blob or a Directory
proto), as well as possibly some
metadata about the file or directory.
In order to ensure that two equivalent directory trees hash to the same
value, the following restrictions MUST be obeyed when constructing a
a Directory
:
- Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed.
- Each child in the directory must have a unique path segment (file name).
- The files and directories in the directory must each be sorted in
lexicographical order by path. The path strings must be sorted by code
point, equivalently, by UTF-8 bytes.
A
Directory
that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file namedbar
and a directory namedfoo
with an executable file namedbaz
(hashes shortened for readability):json // (Directory proto) ` files: [ ` name: "bar", digest: ` hash: "4a73bc9d03...", size: 65534 ` ` ], directories: [ ` name: "foo", digest: ` hash: "4cf2eda940...", size: 43 ` ` ] ` // (Directory proto with hash "4cf2eda940..." and size 43) ` files: [ ` name: "baz", digest: ` hash: "b2c941073e...", size: 1294, `, is_executable: true ` ] `
Instance Attribute Summary collapse
-
#directories ⇒ Array<Google::Apis::RemotebuildexecutionV1::GoogleDevtoolsRemoteexecutionV1testDirectoryNode>
The subdirectories in the directory.
-
#files ⇒ Array<Google::Apis::RemotebuildexecutionV1::GoogleDevtoolsRemoteexecutionV1testFileNode>
The files in the directory.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleDevtoolsRemoteexecutionV1testDirectory
constructor
A new instance of GoogleDevtoolsRemoteexecutionV1testDirectory.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GoogleDevtoolsRemoteexecutionV1testDirectory
Returns a new instance of GoogleDevtoolsRemoteexecutionV1testDirectory
2341 2342 2343 |
# File 'generated/google/apis/remotebuildexecution_v1/classes.rb', line 2341 def initialize(**args) update!(**args) end |
Instance Attribute Details
#directories ⇒ Array<Google::Apis::RemotebuildexecutionV1::GoogleDevtoolsRemoteexecutionV1testDirectoryNode>
The subdirectories in the directory.
Corresponds to the JSON property directories
2334 2335 2336 |
# File 'generated/google/apis/remotebuildexecution_v1/classes.rb', line 2334 def directories @directories end |
#files ⇒ Array<Google::Apis::RemotebuildexecutionV1::GoogleDevtoolsRemoteexecutionV1testFileNode>
The files in the directory.
Corresponds to the JSON property files
2339 2340 2341 |
# File 'generated/google/apis/remotebuildexecution_v1/classes.rb', line 2339 def files @files end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2346 2347 2348 2349 |
# File 'generated/google/apis/remotebuildexecution_v1/classes.rb', line 2346 def update!(**args) @directories = args[:directories] if args.key?(:directories) @files = args[:files] if args.key?(:files) end |