Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!umrobbin From: umrobbin@ccu.umanitoba.ca Newsgroups: comp.sys.amiga.programmer Subject: Questions to the keeper(s) of AmigaDos Message-ID: <1991Jan29.095740.9133@ccu.umanitoba.ca> Date: 29 Jan 91 09:57:40 GMT Organization: University of Manitoba, Winnipeg, Canada Lines: 31 Hi! When one is scanning through a directory, using Examine() and ExNext(), my DOS manual (v1.1) says to look at the type value of the FileInfoBlock to decide whether the entry is a directory or file. But in the structure, there is a DirEntryType and an EntryType. In my 1.3 includes, the DirEntryType has a comment to the effect that this one is positive for directories and negative for files. The EntryType, however, has no comments at all. On the disks I checked, these two values were always identical. Directories were 2 and files were -3. Apparently there is no difference between them, so what is their history? Are they the same in FFS as well? For maximum safety in upward compatibility, should I be using DirEntryType? Why 2 and -3? Second Question: I have a bit of source for an 'ls' program (which may be quite ancient). In it, there is a comment to the effect that the safest way to lock the current directory is cd_lock = CurrentDir(0); "because of bugs in the V1.1 RAM handler". What was the problem? Have these bugs and possible similar ones been killed? What is the safest way to lock the current directory? I've been using cd_lock = Lock("",ACCESS_READ); with no apparent problems, is this okay? Steve Robbins