[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl::SetFileInfo Help (fwd)



At 9:47 AM -0500 7/3/97, Mark Manning/Muniz Eng. wrote:
>NOW - BEFORE I SAY ANYTHING >>>>THIS IS JUST CONJECTURE ON
>MY PART<<<< and not something I read which some Apple
>person posted.  So this is just pure "What IF"!  Ok?

OK. I'm not certain why being an "Apple person" would be a particularly
great credential- there's lots of experienced external developers that I'd
trust much more than some Apple lamer, but allow me to present my
credentials: I used to work at Apple in DTS and System Software, where I
had a really messy office.

>Let's suppose that the OPEN statement opens an I/O
>channel.  Ok - not too hard to do.

It does do this, for some meanings of "an I/O channel".

>Let's suppose that the OPEN statement tells the Mac System
>to provide an exclusive lock on the file so no one else can
>talk to the file.

In general, it does not do this, but this depends on how Matthias
implemented the open().

>Let's suppose that the SetFileInfo command also opens an
>I/O channel.

It does not do this. Setting file information is an atomic command which
does not require a channel (or as we would say, an open FCB).

>Let's also suppose that the SetFileInfo command also
>attempts to open the "exclusive lock" file.

It does not. Setting file information happens independently of the file
being open.

>Then SetFileInfo would not be able to open the file until
>the file had been closed.

Yes, but presumably it would return an error. Are you checking your result
codes?

>Remember!  This is all supposition on my part and has no
>basis in reality other than it follows a logical set of
>steps.

If all you are trying to do is justify why this all seems plausible, then
you've been sucessful.

The stuff that Brian Matthews posted is correct; when changing file
information, you need to unset the inited bit, then change the modification
date on its enclosing folder. Matthias can do this inside of SetFileInfo,
if he chooses, or you can do it yourself with FSpSetCatInfo.

 - Tim

Tim Dierks - timd@consensus.com - www.consensus.com
     Software Haruspex - Consensus Development
  Developer of SSL Plus: SSL 3.0 Integration Suite



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch