This function will resolve an assignment to its 'true file path', according
to the system hosting the Pandora Engine. For instance, on a Linux system a location such as
"athene:documents/readme.txt" would usually translate to
"/athene/documents/readme.txt". On a Windows system, the same
string could translate to "c:/athene/documents/readme.txt".
If an assignment refers to multiple paths, the ResolveAssign() method
will attempt to guess the correct path by checking for the validity of
each possible location. For instance, if you are resolving an assignment
of "user:document.txt" and the "user:" assignment refers
to "system:users/joebloggs/" and "system:users/default/",
the routine will check both directories for the existence of the
document.txt file to determine the correct location. While helpful, this
can often cause problems when creating new files. To circumvent this feature,
use the RSF_NOFILECHECK setting in the Flags argument.
When checking for the location of a file, ResolveAssign() will only accept
an exact filename match. If you know or suspect that the filename is an
approximation (i.e. no extension is set at the end of your Assign string)
then use the RSF_APPROXIMATE flag to tell the function to accept matches to
filenames with extensions.
You are required to supply a STRING variable in the Result argument so
that the resolved path can be returned. The Result string is allocated as a
normal memory block, so you will need to free it once you no longer require
its services.
ERR_Okay | The assignment was resolved. |
ERR_Args | Invalid arguments were specified. |
ERR_AllocMemory | The result string could not be allocated. |
ERR_ExclusiveDenied | Access to the SystemAssignments object was denied. |
ERR_Search | The given assignment does not exist. |
ERR_FileNotFound | The path was resolved, but the referenced file or directory does not exist (use RSF_NOFILECHECK if you need to avoid this error code). |
ERR_Loop | The assignment refers back to itself. |
|