Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creation of a text File in a particular folder not neccesarily application folder.



Hello,
I have the following code.
DialogRef theAlert;
long DirID;
err	= FSMakeFSSpec( foundVRefNum1, foundDirID1,
"\pSharedFile", &spec );
err = FSpDirCreate(&fss,sysScript,(UInt32 *)DirID);
now I call the function FSpCreate
err	= FSMakeFSSpec( foundVRefNum, foundDirID,
"\pSharedFile", &spec );
err = FSOpenDF(&spec,fsRdWrPerm,refNum);
   //trapping the error of the DataFork
CFStringRef ErrString =
CFStringCreateWithFormat(NULL,NULL,CFSTR("%d"),err);
CreateStandardAlert(kAlertStopAlert,ErrString, NULL,
NULL, &theAlert); RunStandardAlert(theAlert, NULL,
NULL);
//it shows a positive error but the next file creation
is not at that directory.
	if ( err == fnfErr )	err	= FSpCreate( &spec, 0, 0,
smSystemScript );
It does not get created in the Specific directory.
HCreate could be the probable function by passing the
directory ID of that particualr file.
But that also does not work fine.



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.