Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!kevinro From: kevinro@microsoft.UUCP (Kevin ROSS) Newsgroups: comp.os.os2 Subject: Re: Extended Attribute questions Message-ID: <54027@microsoft.UUCP> Date: 10 Apr 90 18:09:51 GMT References: <54014@microsoft.UUCP> Reply-To: kevinro@microsoft.UUCP (Kevin ROSS) Distribution: comp Organization: Microsoft Corp., Redmond WA Lines: 24 In article <54014@microsoft.UUCP> alistair@microsoft.UUCP (Alistair BANKS) writes: || 2. The API seems to only allow you to pull out a list of specified || attributes; is there a way of retrieving the whole list, without || specifying the names in advance? If not, how would you duplicate a || file, preserving its attributes, without knowing in advance what || attributes it had? | |The EA retrieval APIs are specified by name (DosQPathInfo, DosFindFirst2), |but you can get the names of EAs attached to a file using: | |USHORT DosEnumAttribute(usRefType, pvFile, ulEntry, pvBuf, cbBuf, pulCount, | ulInfoLevel, ulReserved); | |The DosEnumAttribute function enumerates extended attributes for a specified |file or subdirectory. Once you read the spec for DosEnumAttribute,n you may be wondering why you have to call DosEnumAttribute, instead of a call that returns all extended attributes. The reason for this is that a file could have more than 64k worth of extended attribute information, which would not fit into a segment. Therefore, it may not be possible to return all attributes in one system call. Alot of people miss that, and claim that EnumAttribute it is a poor way of getting to the EA's, when in fact it is a good way of insuring you get everything.