🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2232

Re: How do I get all the extended attributes?

#2232
From: David Bolen
Date: Thu, 01 Oct 1992 23:18
33 lines
2217 bytes
In article <kendall.78@sceng.ub.com> kendall@sceng.ub.com (Greg Kendall) writes:

>I'm trying to write code to copy the extended attriubtes from one file to
>another, which seems to be what XCOPY does.  Both DosFindFirst2 and 
>DosQFileInfo will get them for me, but they both wast the attributes names
>listed.  How do I get a list of all a file's ext. attr. names, or is there
>another API (that will just give them all to me) that I've missed?

Well, XCOPY cheats.

Technically, you should check out the DosEnumAttribute function to see about
enumerating all the extended attributes for a filesystem object.  I'm not
sure if it exists in OS/2 1.2, but it definitely does in 1.3 and 2.0.  That
should take care of what you want.

Unofficially, if you want to follow in XCOPY's footsteps, you can try using
using the (undocumented, unsupported, run your own risk, but it definitely
works on 1.x systems) level 4 option to DosQFile/PathInfo.  It will use the
supplied buffer to return a complete set of EA tags and values.

I don't recall how the buffer is formatted, but give it a shot and take a
look at the result and it will probably be clear.  It's likely something
like tag (null) value (null) tag (null) value (null) .... (null) (null).


--
-- David
--
/-----------------------------------------------------------------------\
 \              David Bolen             \  Internet: db3l@ans.net      /
  |   Advanced Network & Services, Inc.   \   Phone: (914) 789-5327   |
 / 100 Clearbrook Road, Elmsford, NY 10523  \   Fax: (914) 789-5310    \
\-----------------------------------------------------------------------/
Technical Details
Message-ID: <1992Oct02.031459.22264@ans.net>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!malgudi.oar.net!news.ans.net!ans.net!db3l
References: <kendall.78@sceng.ub.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!malgudi.oar.net!news.ans.net!ans.net!db3l
From: db3l@ans.net (David Bolen)
Subject: Re: How do I get all the extended attributes?
Sender: news@ans.net (News Administrator)
Message-ID: <1992Oct02.031459.22264@ans.net>
In-Reply-To: kendall@sceng.ub.com's message of Thu, 1 Oct 1992 23: 36:42 GMT
Date: Thu, 1 Oct 1992 23:18:39 GMT
References: <kendall.78@sceng.ub.com>
Organization: Advanced Network & Services, Inc. - Elmsford, NY
Lines: 33