append.lua 829 B

1234567891011121314151617181920212223242526272829303132333435
  1. return {
  2. summary = 'Append content to the end of a file.',
  3. description = 'Appends content to the end of a file.',
  4. arguments = {
  5. filename = {
  6. type = 'string',
  7. description = 'The file to append to.'
  8. },
  9. content = {
  10. type = 'string',
  11. description = 'A string to write to the end of the file.'
  12. },
  13. blob = {
  14. type = 'Blob',
  15. description = 'A Blob containing data to append to the file.'
  16. }
  17. },
  18. returns = {
  19. bytes = {
  20. type = 'number',
  21. description = 'The number of bytes actually appended to the file.'
  22. }
  23. },
  24. variants = {
  25. {
  26. arguments = { 'filename', 'content' },
  27. returns = { 'bytes' }
  28. },
  29. {
  30. arguments = { 'filename', 'blob' },
  31. returns = { 'bytes' }
  32. }
  33. },
  34. notes = 'If the file does not exist, it is created.'
  35. }