isFile.lua 511 B

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