mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
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:
+9
@@ -13093,6 +13093,15 @@
|
||||
"description": "File modification time in Unix milliseconds when available, otherwise `0`.",
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"sizeBytes": {
|
||||
"description": "Size in bytes if the path resolves to a regular file, otherwise null. Older servers omit this field.",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
+9
@@ -8847,6 +8847,15 @@
|
||||
"description": "File modification time in Unix milliseconds when available, otherwise `0`.",
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"sizeBytes": {
|
||||
"description": "Size in bytes if the path resolves to a regular file, otherwise null. Older servers omit this field.",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -23,6 +23,15 @@
|
||||
"description": "File modification time in Unix milliseconds when available, otherwise `0`.",
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"sizeBytes": {
|
||||
"description": "Size in bytes if the path resolves to a regular file, otherwise null. Older servers omit this field.",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+5
-1
@@ -25,4 +25,8 @@ createdAtMs: number,
|
||||
/**
|
||||
* File modification time in Unix milliseconds when available, otherwise `0`.
|
||||
*/
|
||||
modifiedAtMs: number, };
|
||||
modifiedAtMs: number,
|
||||
/**
|
||||
* Size in bytes if the path resolves to a regular file, otherwise null. Older servers omit this field.
|
||||
*/
|
||||
sizeBytes?: number | null, };
|
||||
|
||||
Reference in New Issue
Block a user