Skip to main content

GetPackageFilePath

This function was added in DSL 3

Description

Get the path of a file located in DSL's packages folder.

The filename is optional just like in GetScriptFilePath. If not specified, it will return the path to the packages folder itself.

This is what you should be using to get your DLL file if you have a package script using loadlib.

function GetPackageFilePath(filename) --[[ ... ]] end

Parameters

  • filename: string? - (Optional) The name of the file to get the path for.

Return Values

  • fullPath: string - The full path to the file in the packages folder. If filename is not specified, it returns the path to the packages folder itself.

Example

local fullPath = GetPackageFilePath('mydll.dll')
print('The full path to the DLL is: ' .. fullPath)

See Also