Mailing Lists: Apple Mailing Lists

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

RE: How to get extension of a file??



 

yes it does return the name user entered,but if I save a ‘.txt’ file as ‘abc’ and than I create a new file and save it as ‘abc.txt’ a new file is created in the same location.

Instead some error message like “File already exists at this location” should  popup.

So I simply want to make a check before saving this file if a file with same name exists or not.Presently I check this by creating an FSRef for the path,if it is valid the file exists else it doesn’t.

Also the documentation for NavDialogGetSaveFileName says that it would return me a filename with extension irrespective of whether user specified the file extension or not.

 

-----Original Message-----
From: Laurence Harris [mailto:email@hidden]
Sent: Thursday, September 29, 2005 8:44 PM
To: Mita Baxi; email@hidden
Subject: Re: How to get extension of a file??

 

On 9/29/05 11:06 AM, Mita Baxi didst favor us with:

 

> Is there any way to get an extension of a file after running navigation

> dialog .

 

If this is a save file dialog, there's no file from which to get a name or

extension.

>

> I got one API "NavDialogGetSaveFilename" which states that it'll return

> fullname of file alongwith its extension, but it is not returning the

> same.

 

It should be returning whatever the user entered in the dialog. Is that not

the case?

 

Larry

 

 _______________________________________________
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.