getString.lua 471 B

12345678910111213141516171819
  1. return {
  2. summary = 'Get the Blob\'s contents as a string.',
  3. description = 'Returns a binary string containing the Blob\'s data.',
  4. arguments = {},
  5. returns = {
  6. {
  7. name = 'data',
  8. type = 'string',
  9. description = 'The Blob\'s data.'
  10. }
  11. },
  12. example = {
  13. description = 'Manually copy a file using Blobs:',
  14. code = [[
  15. blob = lovr.filesystem.newBlob('image.png')
  16. lovr.filesystem.write('copy.png', blob:getString())
  17. ]]
  18. }
  19. }