Vendetta/API/find file

From Quasar-RCE
Revision as of 06:49, 3 March 2025 by Wikiadmin (talk | contribs) (created find_file)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Definition

lib.find_file (filepath, ...) :: nil

Description

Attempts to find a file using a variety of path options. This can be useful when you do not want to instantly run lua code with lib.resolve_file (such as using your own method of running the code, or when you need to pass arguments)

Arguments

  1. string filepath: Primary file path to check
  2. string ...: alternate path(s) to check

Returns

  1. string valid_path: First valid path detected
  2. table all_valid: table containing every valid path detected

Other notes

  • Split from lib.resolve_file and added as its own function in LME 3.7.x
  • ../ and ../../ are checked for every provided path entry as well, in case the path is being adjusted by the Vendetta Online sandbox