main logo
Subject: Re: [C++] FSCreateFileUnicode()
Author: Totte Alm
Posted: 2002/11/29 01:53:43
 
View Entire Thread
New Search


--Apple-Mail-28-116081775
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
delsp=yes;
charset=ISO-8859-1;
format=flowed


fredagen den 29 november 2002 kl 00.02 skrev Ruslan Zasukhin:

> on 11/28/02 7:49 PM, St=E9phane Sudre at ssudre at intego .D.OT com wrote:
>
>> On mercredi, nov 27, 2002, at 23:52 Europe/Paris, Ruslan Zasukhin =20
>> wrote:
>>
>>> Hi All,
>>>
>>> Another strange thing for me.
>>>
>>> FSCreateFileUnicode() do not have Creator and Type parameters
>>> Like we have in FSpCreate()
>>>
>>> Why ?
>>
>> It does offer it via the FSCatalogInfo parameter.
>>
>>> Where and how Apple now offer us set up them ???
>>
>> You can set the FSCatalogInfo finderInfo values before calling
>> FSCreateFileUnicode.
>
> Thank you St=E9phane for answer.
>
> But as for me, Apple really going to make things harder with =20
> Creator/Type.
> And just only I have CC on list message where Lane say that Apple is =20=

> going
> kill Creator/Type parameters.
>
> I don't know if this is 100% true... :-(

Ruslan, this is the story and the reasons as I've understood it. I =20
myself LOVE the creator/filetype thing, but the world outside MacOS =20
just doesnt get it.

(1) We now can access other file systems VERY easy from OSX via SMB & =20=

NFS, and those filesystems dont have resourceforks, so we lose the =20
info, leaving OSX blind without extensions.

(2) On the net, MIME-types are everything.

(3) Apple want developers to use data-file resourceforks on our Bundled =20=

Apps, to allow apps to be freely moved on/off SMB/NFS volumes without =20=

becoming trashed.

Another thing on Valentina Datafiles. OpenBase has a Folde that =20
represent ONE database. Maybe you should think that way, represent a =20
Valentina database with a Folder named mydatabase.vdb for example, and =20=

inside have 1->x files. Just a thought. This works on Windows/OSX/Linux =20=

for them, so it should work for Valentina Also.

ON OSX you can bundle that Folder to have an icon and be clickable just =20=

like a datafile.

// Totte

>
>> Some code I'm using to add them AFTER creating files:
>>
>> int SetTypeAndCreator(FSRef * inFSRef, OSType inType, OSType =20
>> inCreator)
>> {
>> FSCatalogInfo tCatalogInfo;
>> FileInfo tFileInfo;
>> OSErr err;
>>
>>
>> =
err=3DFSGetCatalogInfo(inFSRef,kFSCatInfoFinderInfo,&tCatalogInfo,NULL,N=20=

>> UL
>> L,NULL);
>>
>> if (err!=3DnoErr)
>> {
>> memcpy(&tFileInfo,tCatalogInfo.finderInfo,16*sizeof(unsigned
>> char));
>>
>> tFileInfo.fileCreator=3DinCreator;
>> tFileInfo.fileType=3DinType;
>>
>> memcpy(tCatalogInfo.finderInfo,&tFileInfo,16*sizeof(unsigned
>> char));
>>
>>
>> err=3DFSSetCatalogInfo(inFSRef,kFSCatInfoFinderInfo,&tCatalogInfo);
>> }
>>
>> return err;
>> }
>> _______________________________________________
>> darwin-development mailing list | darwin-development@lists.apple.com
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/darwin-development
>> Do not post admin requests to the list. They will be ignored.
>
> --=20
> Best regards,
> Ruslan Zasukhin [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft .D.OT com
> web: http://www.paradigmasoft.com
>
> To subscribe to the Valentina mail list
> send a letter to valentina-on@lists.macserve.net
> -------------------------------------------------------------
>
>-----------------------------------------------------------------------=20=

-----------------------
A Microsoft Certified Systems Engineer is to computing what a McDonalds =20=

Certified Food Specialist is to fine cuisine.


--Apple-Mail-28-116081775
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1



fredagen den 29 november 2002 kl 00.02 skrev Ruslan Zasukhin:


<excerpt>on 11/28/02 7:49 PM, St=E9phane Sudre at ssudre at intego .D.OT com
wrote:


<excerpt>On mercredi, nov 27, 2002, at 23:52 Europe/Paris, Ruslan
Zasukhin wrote:


<excerpt>Hi All,


Another strange thing for me.


FSCreateFileUnicode() do not have Creator and Type parameters

Like we have in FSpCreate()


Why ?

</excerpt>

It does offer it via the FSCatalogInfo parameter.


<excerpt>Where and how Apple now offer us set up them ???

</excerpt>

You can set the FSCatalogInfo finderInfo values before calling

FSCreateFileUnicode.

</excerpt>

Thank you St=E9phane for answer.


But as for me, Apple really going to make things harder with
Creator/Type.

And just only I have CC on list message where Lane say that Apple is
going

kill Creator/Type parameters.


I don't know if this is 100% true... :-(

</excerpt>

Ruslan, this is the story and the reasons as I've understood it. I
myself LOVE the creator/filetype thing, but the world outside MacOS
just doesnt get it.


(1) We now can access other file systems VERY easy from OSX via SMB &
NFS, and those filesystems dont have resourceforks, so we lose the
info, leaving OSX blind without extensions.


(2) On the net, MIME-types are everything.


(3) Apple want developers to use data-file resourceforks on our
Bundled Apps, to allow apps to be freely moved on/off SMB/NFS volumes
without becoming trashed.


Another thing on Valentina Datafiles. OpenBase has a Folde that
represent ONE database. Maybe you should think that way, represent a
Valentina database with a Folder named mydatabase.vdb for example, and
inside have 1->x files. Just a thought. This works on
Windows/OSX/Linux for them, so it should work for Valentina Also.


ON OSX you can bundle that Folder to have an icon and be clickable
just like a datafile.


// Totte


<excerpt>

<excerpt>Some code I'm using to add them AFTER creating files:


int SetTypeAndCreator(FSRef * inFSRef, OSType inType, OSType inCreator)

{

FSCatalogInfo tCatalogInfo;

FileInfo tFileInfo;

OSErr err;



err=3DFSGetCatalogInfo(inFSRef,kFSCatInfoFinderInfo,&tCatalogInfo,NULL,NUL=


L,NULL);


if (err!=3DnoErr)

{

memcpy(&tFileInfo,tCatalogInfo.finderInfo,16*sizeof(unsigned

char));


tFileInfo.fileCreator=3DinCreator;

tFileInfo.fileType=3DinType;


memcpy(tCatalogInfo.finderInfo,&tFileInfo,16*sizeof(unsigned

char));



err=3DFSSetCatalogInfo(inFSRef,kFSCatInfoFinderInfo,&tCatalogInfo);

}


return err;

}

_______________________________________________

darwin-development mailing list | darwin-development@lists.apple.com

Help/Unsubscribe/Archives:

http://www.lists.apple.com/mailman/listinfo/darwin-development

Do not post admin requests to the list. They will be ignored.

</excerpt>

--=20

Best regards,

Ruslan Zasukhin [ I feel the need...the need for speed ]

-------------------------------------------------------------

e-mail: ruslan at paradigmasoft .D.OT com

web: http://www.paradigmasoft.com


To subscribe to the Valentina mail list

send a letter to valentina-on@lists.macserve.net

-------------------------------------------------------------



-------------------------------------------------------------
=
</excerpt>----------------------------------------------------------------=
-------------------------------

<fontfamily><param>Verdana</param><smaller>A Microsoft Certified
Systems Engineer is to computing what a McDonalds Certified Food
Specialist is to fine cuisine.

</smaller></fontfamily>


--Apple-Mail-28-116081775--


--pple-Mail-28-11608177
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
 
©2002 Totte Alm
<-- Prior Message New Search Next Message -->