get_file_metadata
Retrieve file metadata such as size, content-type, and last-modified date without downloading the file. Works with S3 URIs or relative paths.
Instructions
Get metadata for a specific file without downloading it. Uses obstore's head operation for efficient metadata retrieval.
Args: path: S3 URI (s3://...) or relative path (account_id/product_id/file)
Returns: File metadata: size, content-type, last-modified, etag, URLs
Example: >>> await get_file_metadata("harvard-lil/gov-data/README.md") { "key": "harvard-lil/gov-data/README.md", "content_type": "binary/octet-stream", "content_length": 5344, "last_modified": "2025-02-06T16:29:24+00:00", ... }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||