GeminiFile
A file resource uploaded via the Gemini Files API
Inherits: EndPoint
Operations
GetCreateTime
Get file creation timestamp
method : public : GetCreateTime() ~ StringReturn
| Type | Description |
|---|---|
| String | creation time (RFC 3339) |
GetDisplayName
Get human-readable display name
method : public : GetDisplayName() ~ StringReturn
| Type | Description |
|---|---|
| String | display name |
GetMimeType
Get MIME type of the file
method : public : GetMimeType() ~ StringReturn
| Type | Description |
|---|---|
| String | MIME type |
GetName
Get file resource name (e.g. "files/abc123")
method : public : GetName() ~ StringReturn
| Type | Description |
|---|---|
| String | resource name |
GetSizeBytes
Get size in bytes as a string
method : public : GetSizeBytes() ~ StringReturn
| Type | Description |
|---|---|
| String | size bytes string |
GetState
Get processing state of the file
method : public : GetState() ~ StringReturn
| Type | Description |
|---|---|
| String | state (ACTIVE, PROCESSING, FAILED) |
GetUri
Get the URI to reference this file in content parts
method : public : GetUri() ~ StringReturn
| Type | Description |
|---|---|
| String | file URI |
IsActive
Check whether the file is ready for use
method : public : IsActive() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if state is ACTIVE |