storage Types
storage.Folder
Execution-owned folder; not serializable and exposes only these defined operations.
handle
Fields
- name
- core.string
- path
- core.string
- size
- core.integer
- modifiedAt
- core.datetime
get
File/Folder handle or null.
| Argument | Type | Required | Default |
|---|---|---|---|
| path | core.string | Yes | — |
Returns: storage.Entry?
newFolder
Folder, creating it according to the Service contract.
| Argument | Type | Required | Default |
|---|---|---|---|
| path | core.string | Yes | — |
Returns: storage.Folder
newFile
New File; exclusive creation fails with Conflict if an entry already exists.
| Argument | Type | Required | Default |
|---|---|---|---|
| path | core.string | Yes | — |
Returns: storage.File
list
invoke the named one-argument helper for each entry.
| Argument | Type | Required | Default |
|---|---|---|---|
| pattern | core.string | Yes | — |
| visitor | storage.Visitor | Yes | — |
Returns: core.void
Statement Only · No Return Value
isFile
Boolean.
No Arguments
Returns: core.boolean
isFolder
Boolean.
No Arguments
Returns: core.boolean
storage.File
Execution-owned file; not serializable and exposes only these defined operations.
handle
Fields
- name
- core.string
- path
- core.string
- size
- core.integer
- modifiedAt
- core.datetime
isFile
Boolean.
No Arguments
Returns: core.boolean
isFolder
Boolean.
No Arguments
Returns: core.boolean
asString
Text or bytes under the Service's read contract.
No Arguments
Returns: core.string
asBytes
Text or bytes under the Service's read contract.
No Arguments
Returns: core.bytes
write
write text or stream data.
| Argument | Type | Required | Default |
|---|---|---|---|
| value | storage.WriteContent | Yes | — |
Returns: core.void
Statement Only · No Return Value
openRead
Owned ReadStream.
No Arguments
Returns: storage.ReadStream
openWrite
Owned WriteStream.
| Argument | Type | Required | Default |
|---|---|---|---|
| append | core.boolean | No | false |
Returns: storage.WriteStream
storage.Entry
Execution-owned entry; not serializable and exposes only these defined operations.
handle
Fields
- name
- core.string
- path
- core.string
- size
- core.integer
- modifiedAt
- core.datetime
isFile
Boolean.
No Arguments
Returns: core.boolean
isFolder
Boolean.
No Arguments
Returns: core.boolean
asString
Read the file as text.
No Arguments
Returns: core.string
asBytes
Read the file as bytes.
No Arguments
Returns: core.bytes
write
Write the permitted text or ReadStream content.
| Argument | Type | Required | Default |
|---|---|---|---|
| value | storage.WriteContent | Yes | — |
Returns: core.void
Statement Only · No Return Value
openRead
Open an owned read stream.
No Arguments
Returns: storage.ReadStream
openWrite
Open an owned write stream.
| Argument | Type | Required | Default |
|---|---|---|---|
| append | core.boolean | No | false |
Returns: storage.WriteStream
get
File/Folder handle or null.
| Argument | Type | Required | Default |
|---|---|---|---|
| path | core.string | Yes | — |
Returns: storage.Entry?
newFolder
Folder, creating it according to the Service contract.
| Argument | Type | Required | Default |
|---|---|---|---|
| path | core.string | Yes | — |
Returns: storage.Folder
newFile
New File; exclusive creation fails with Conflict if an entry already exists.
| Argument | Type | Required | Default |
|---|---|---|---|
| path | core.string | Yes | — |
Returns: storage.File
list
invoke the named one-argument helper for each entry.
| Argument | Type | Required | Default |
|---|---|---|---|
| pattern | core.string | Yes | — |
| visitor | storage.Visitor | Yes | — |
Returns: core.void
Statement Only · No Return Value
storage.ReadStream
Execution-owned readStream; not serializable and exposes only these defined operations.
handle
read
Up to count bytes, or null at EOF; count must be positive.
| Argument | Type | Required | Default |
|---|---|---|---|
| count | core.integer | Yes | — |
Returns: core.bytes?
close
release an owned stream, safely repeatable.
No Arguments
Returns: core.void
Statement Only · No Return Value
storage.WriteStream
Execution-owned writeStream; not serializable and exposes only these defined operations.
handle
write
WriteStream only.
| Argument | Type | Required | Default |
|---|---|---|---|
| bytes | core.bytes | Yes | — |
Returns: core.void
Statement Only · No Return Value
close
release an owned stream, safely repeatable.
No Arguments
Returns: core.void
Statement Only · No Return Value
storage.Visitor
Named helper visiting each listed entry.
function
storage.WriteContent
Permitted file-write content.
union
core.string | storage.ReadStream