getSize.lua 494 B

123456789101112131415161718192021222324
  1. return {
  2. tag = 'filesystem-files',
  3. summary = 'Get the size of a file.',
  4. description = 'Returns the size of a file, in bytes.',
  5. arguments = {
  6. file = {
  7. type = 'string',
  8. description = 'The file.'
  9. }
  10. },
  11. returns = {
  12. size = {
  13. type = 'number',
  14. description = 'The size of the file, in bytes.'
  15. }
  16. },
  17. variants = {
  18. {
  19. arguments = { 'file' },
  20. returns = { 'size' }
  21. }
  22. },
  23. notes = 'If the file does not exist, an error is thrown.'
  24. }