remove.lua 645 B

12345678910111213141516171819202122232425262728
  1. return {
  2. tag = 'filesystem-files',
  3. summary = 'Remove a file or directory.',
  4. description = 'Remove a file or directory in the save directory.',
  5. arguments = {
  6. path = {
  7. type = 'string',
  8. description = 'The file or directory to remove.'
  9. }
  10. },
  11. returns = {
  12. success = {
  13. type = 'boolean',
  14. description = 'Whether the path was removed.'
  15. }
  16. },
  17. variants = {
  18. {
  19. arguments = { 'path' },
  20. returns = { 'success' }
  21. }
  22. },
  23. notes = [[
  24. A directory can only be removed if it is empty.
  25. To recursively remove a folder, use this function with `lovr.filesystem.getDirectoryItems`.
  26. ]]
  27. }