It seems that the primary system call to change a new directory within an Amiga process is
dos.library/CurrentDir(lock) but the documentation does not tell me how to detect if it succeeded.
Quoting from the documentation:
CurrentDir() causes a directory associated with a lock to be made the current directory. The old current directory lock is returned.
A value of zero is a valid result here, this 0 lock represents the root of file system that you booted from.
Any call that has to Open() or Lock() files (etc) requires that the current directory be a valid lock or 0.
lock - BCPL pointer to a lock
oldLock - BCPL pointer to a lock
The problem is the part where "a value of zero is a valid result". What would (or should) happen if I supply for example a file lock? They are the same type of objects.