|
@@ -2,22 +2,33 @@ return {
|
|
|
summary = 'Append content to the end of a file.',
|
|
|
description = 'Appends content to the end of a file.',
|
|
|
arguments = {
|
|
|
- {
|
|
|
- name = 'filename',
|
|
|
+ filename = {
|
|
|
type = 'string',
|
|
|
description = 'The file to append to.'
|
|
|
},
|
|
|
- {
|
|
|
- name = 'content',
|
|
|
+ content = {
|
|
|
type = 'string',
|
|
|
description = 'A string to write to the end of the file.'
|
|
|
+ },
|
|
|
+ blob = {
|
|
|
+ type = 'Blob',
|
|
|
+ description = 'A Blob containing data to append to the file.'
|
|
|
}
|
|
|
},
|
|
|
returns = {
|
|
|
- {
|
|
|
- name = 'bytes',
|
|
|
+ bytes = {
|
|
|
type = 'number',
|
|
|
- description = 'The number of bytes actually written to the file.'
|
|
|
+ description = 'The number of bytes actually appended to the file.'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ variants = {
|
|
|
+ {
|
|
|
+ arguments = { 'filename', 'content' },
|
|
|
+ returns = { 'bytes' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ arguments = { 'filename', 'blob' },
|
|
|
+ returns = { 'bytes' }
|
|
|
}
|
|
|
},
|
|
|
notes = 'If the file does not exist, it is created.'
|