You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JoeStrout edited this page Oct 17, 2026
·
3 revisions
Change working directory, returns 0 on success (nonzero on failure)
Parameters
Parameter
Default Value
Note
dirPath
Return value
Condition
Return Value
(always)
number
Notes
Returns 0 on success and nonzero on failure (raylib 6.2 convention). Before raylib 6.2 this returned true (1) on success, so old if raylib.ChangeDirectory(path) then checks are now inverted.
Example
ifraylib.ChangeDirectory("/home/user/myproject") ==0thenprint"Directory changed."elseprint"Failed to change directory."endif