stud.dat is a primitive, those live in the "ldraw/p/" subfolder.
When resolving any type 1 line you need to fist look into the file's own folder, if it's not there look in "ldraw/parts/" if also not there look into "ldraw/p/". If still not found it's a missing file or the user needs to supply additional search paths to your program.
Also if the file is an MPD document, you need to search the "0 FILE " lines before searching the fs.
hope this helps.
[edit] Travis was a bit quicker
When resolving any type 1 line you need to fist look into the file's own folder, if it's not there look in "ldraw/parts/" if also not there look into "ldraw/p/". If still not found it's a missing file or the user needs to supply additional search paths to your program.
Also if the file is an MPD document, you need to search the "0 FILE " lines before searching the fs.
hope this helps.
[edit] Travis was a bit quicker