isDirectory.lua 531 B

1234567891011121314151617181920212223242526
  1. return {
  2. tag = 'filesystem-files',
  3. summary = 'Check whether a path is a directory.',
  4. description = 'Check if a path exists and is a directory.',
  5. arguments = {
  6. path = {
  7. type = 'string',
  8. description = 'The path to check.'
  9. }
  10. },
  11. returns = {
  12. isDirectory = {
  13. type = 'boolean',
  14. description = 'Whether or not the path is a directory.'
  15. }
  16. },
  17. variants = {
  18. {
  19. arguments = { 'path' },
  20. returns = { 'isDirectory' }
  21. }
  22. },
  23. related = {
  24. 'lovr.filesystem.isFile'
  25. }
  26. }