newBlob.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. return {
  2. summary = 'Create a new Blob.',
  3. description = 'Creates a new Blob.',
  4. arguments = {
  5. size = {
  6. type = 'number',
  7. description = [[
  8. The amount of data to allocate for the Blob, in bytes. All of the bytes will be filled with
  9. zeroes.
  10. ]]
  11. },
  12. contents = {
  13. type = 'string',
  14. description = 'A string to use for the Blob\'s contents.'
  15. },
  16. source = {
  17. type = 'Blob',
  18. description = 'A Blob to copy the contents from.'
  19. },
  20. name = {
  21. type = 'string',
  22. default = [['']],
  23. description = 'A name for the Blob (used in error messages)',
  24. }
  25. },
  26. returns = {
  27. blob = {
  28. type = 'Blob',
  29. description = 'The new Blob.'
  30. }
  31. },
  32. variants = {
  33. {
  34. arguments = { 'size', 'name' },
  35. returns = { 'blob' }
  36. },
  37. {
  38. arguments = { 'contents', 'name' },
  39. returns = { 'blob' }
  40. },
  41. {
  42. arguments = { 'source', 'name' },
  43. returns = { 'blob' }
  44. }
  45. },
  46. related = {
  47. 'lovr.filesystem.newBlob'
  48. }
  49. }