FindFirstFile

From the Oblivion ConstructionSet Wiki
Revision as of 08:33, 26 April 2009 by imported>Low Post (New page: A command for Pluggy. '''Syntax:''' (IsFileFound:bool) FindFirstFile ''(FileFound)StringID:long'' ''(FileMask)StringID:long'' ''RootID:short'' ''Directories:bool'' ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A command for Pluggy.

Syntax:

(IsFileFound:bool) FindFirstFile (FileFound)StringID:long (FileMask)StringID:long RootID:short Directories:bool Global:bool

Note: All arguments should be on the same line.


Sets the content of (FileFound)StringID to the Filename of the first matching File and returns 1 if a file was found; 0 if not.

Notes

  • FileMask is the StringID of the string containing the Windows filemask for the search. Wildcards are allowed. Default is -42 (*) (i.e.: every file).
  • RootID specifies in which folder the search should be proceeded. Default is 0.
    • 0: "My Documents\My Games\Oblivion\Pluggy\User Files\"
    • 1: Oblivion Data folder.
    • 2: Oblivion main folder.
  • Defines if files (0) or directories (1) are returned. Default is 0.
  • If you want to modify a string from another mod, you will need to set the Global flag to 1. If Global is 0 or unset the function will fail. If the string is protected the function will fail.

See also