O$ - FileOps strangeness...

David Walton omuser at charlie.housing.admin.nyu.edu
Mon Apr 20 08:56:37 EDT 2009


Seems I am now encountering an issue with the 12 byte header - which  
isn't being read - or written. Don't know how to get windows to read  

Any ideas?

It gives the message that Omnis can't read the library file (the one  
I'm reading and writing).

In brief, here's what I'm doing...

There's a version update button that , when clicked, prompts for a  
library file. The file is read and placed into the database. Then,  
when a client logs in, it fetches the most current library file and  
replaces their local copy. Then it relaunches the library again.

I can look at the binary that is written to the database from windows  
and it doesn't have the 12 byte header. I assume that is causing  
windows to not understand the file type???


On Apr 17, 2009, at 7:44 PM, Kelly Burgess wrote:

> Hi David,
>> Do FileOps.$readentirefile(ipath,lbinary) returns lstatus
>> This works fine on OSX but lstatus returns -47 (open file error) on  
>> XP.
> I've never used this function on Windows.  Its advantage is that on  
> Mac it collects both data and resource forks of a file - if they  
> both exist. Even for files that don't contain a resource fork, the  
> binary returned will still have a 12-byte header containing Mac file  
> type and creator, and an offset to a potential resource fork, a.k.a.  
> the size of the data fork following the header.
> So on Windows I'd be inclined to use a FileOps object with $open/ 
> $read/$close instead.
> Kelly
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com

More information about the omnisdev-en mailing list