getRealDirectory.lua 653 B

1234567891011121314151617181920212223242526
  1. return {
  2. tag = 'filesystem-virtual',
  3. summary = 'Get the absolute path to a file.',
  4. description = [[
  5. Get the absolute path of the mounted archive containing a path in the virtual filesystem. This
  6. can be used to determine if a file is in the game's source directory or the save directory.
  7. ]],
  8. arguments = {
  9. path = {
  10. type = 'string',
  11. description = 'The path to check.'
  12. }
  13. },
  14. returns = {
  15. realpath = {
  16. type = 'string',
  17. description = 'The absolute path of the mounted archive containing `path`.'
  18. }
  19. },
  20. variants = {
  21. {
  22. arguments = { 'path' },
  23. returns = { 'realpath' }
  24. }
  25. }
  26. }