Return file sizes from fs/getMetadata (#62653)

## What changed

Add `sizeBytes` to the app server's metadata response so clients can
read a file's size in bytes from its metadata. The field reports the
target file's size for symlinks to regular files and is `null` for
paths that resolve to directories or other non-regular files. The
protocol schemas and generated Python SDK model accept responses from
older servers that omit the field.

## Testing

Cover byte counts for regular files and symlinks to files, explicit
`null` for directories, and decoding responses that omit `sizeBytes`.

GitOrigin-RevId: fcc7bda9e55bd0584c1eff4af059422af282da9f
This commit is contained in:
Felipe Coury
2026-11-20 02:42:43 +00:00
committed by copyberry
parent 2c1b4c7c35
commit e787cf7024
12 changed files with 90 additions and 25 deletions
@@ -126,6 +126,7 @@ impl FsRequestProcessor {
is_symlink: metadata.is_symlink,
created_at_ms: metadata.created_at_ms,
modified_at_ms: metadata.modified_at_ms,
size_bytes: metadata.is_file.then_some(metadata.size),
})
}