Path Functions

From Danmakufu Wiki
Jump to: navigation, search

GetFileDirectory

Parameters:
 1) file path (char)

Returns the directory of the specified file path. Specifically, returns the input string up to the rightmost forward slash, with backslashes removed.

GetFilePathList

Parameters:
 1) file path (char)

Returns a list of files in the folder of the specified file path (or folder path).

GetDirectoryList

Parameters:
 1) file/folder path (char)

Returns an array of the directories available within the directory of the specified path.

GetModuleDirectory

Returns the directory containing the running th_dnh.exe file.

GetMainStgScriptPath

Returns the path of the current stage of the script running.

GetMainPackageScriptPath

Returns the directory of the currently running package script.

GetMainStgScriptDirectory

Returns the directory of the current stage of the script running.

GetCurrentScriptDirectory

Returns the directory of the file in which this function was called.

GetScriptPathList

Parameters:
 1) file/folder path (char)
 2) script type (constant)

Returns an array of available (selectable at selection screen) scripts of the specified type within the directory of the specified path. Script types are:

  • TYPE_SCRIPT_ALL: All scripts
  • TYPE_SCRIPT_PLAYER: Player scripts
  • TYPE_SCRIPT_SINGLE: Single scripts
  • TYPE_SCRIPT_PLURAL: Plural scripts
  • TYPE_SCRIPT_STAGE: Stage scripts
  • TYPE_SCRIPT_PACKAGE: Package scripts