Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!cs.utexas.edu!uunet!mcsun!unido!nadia!dialog!root From: root@dialog.UUCP (Christian Motz) Newsgroups: comp.os.os2 Subject: Re: HPFS Message-ID: <1337@dialog.UUCP> Date: 23 Oct 89 17:38:32 GMT References: <13271@orstcs.CS.ORST.EDU> Reply-To: root@dialog.UUCP (Christian Motz) Organization: Dialog Software Development Lines: 52 In article <13271@orstcs.CS.ORST.EDU> osbornk@uther.CS.ORST.EDU (Kasey S. Osborn) writes: > > [...] > >I understand that OS/2 1.2 allows the DosOpen function to specify >additional flags for the fsOpenMode parameter. This feature is >available only on HPFS partitions. These new flags are advisory - >they inform the operating system of the programs intent. They advise >the file system of whether the program will access a file randomly or >sequentially, for example. This allows the cache system to make >informed decisions - extending the efficiency of HPFS. I'm missing >FAT already. > >I suppose if you knew (I don't) what the values of these manifest >constants were, a programmer could write code for it now. The next >OS/2 Softset should have these goodies, in any case. Actually the whole thing works like that: There is no difference in how files for FAT or HPFS are opened. The same call syntax is valid for both file systems. The OS is told whether or not the application can cope with non-8.3 filenames via a flag in the .EXE-header which is set at link-time (Keyword "LONGNAMES" in the .DEF file). The "correct" way to handle IFS's (Installable File Systems) under 1.2 is to query the OS for the maximum path length using DosQSystem (as far as I recall) and reserve the amount of space for file names using that value. For HPFS this value is 260, meaning that a fully qualified path (including drive letter, colon, backslash and \0) can have this length, with no individual limit for the path components. This means if you have a file in the root directory, its name can be up to 256 characters long, whereas in a subdirectory this maximum length would be shorter. This solution is kinda strange, but it beats the old 8.3 FAT filesystem anytime. The only thing I do not like is that filenames are still *ALWAYS* converted to uppercase. I have no problem with case insensitivity, but one should at least be able to mix cases in a file name, sorta like on the Amiga OS. Grmpf. I knew they wouldn't do it right :-) There seems to be the rumor that only HPFS partitions support the Extended Attributes (EA's) that exist in OS/2 1.2. Very clearly this is not the case. EA's can also be used on FAT partitions, where they are stored in a hidden systemfile with an "impossible" name (i.e. it contains a blank). BTW, EA's can be accessed via DosOpen2() or FileFindFirst2(), where a so-called "Info-Level" can be specified, telling the OS how much we want to know about EA's. I hope that this helped to clear up things a bit ... -- Christian Motz uucp: ...!uunet!mcvax!unido!nadia!dialog!root "Trust me, I know what I'm doing!" -- Sledge Hammer Bix: cmotz