file searching

Login to reply to this topic.
Wed, 2008-07-30 10:50
Joined: 2008-06-27
Forum posts: 17

hi..im developing an application in which i am writing various files to a specified directory,
with the file name written in dialog box, and the moment Ok on dialog is pressed, a file is generated with that name in the specified directory.

Now i want that whenever a file name is entered in the dialog and ok is pressed then it first checks for the file and if it exists in the directory then a prompt or pop up is displayed "file exists , enter new name", and again we can enter the file name in dialog box.following is the code im using for creating files in directory:

RFile File;
RFs iFs;
TBuf<200>avar;

avar.Copy(_L("C:\\ACM\\lists\\BL_"));
avar.Append(text);
avar.Append(_L(".xml"));
iFs.Connect();
File.Replace(iFs,avar,EFileWrite);
File.Append(text);
//File.Write(aVar1);
File.Close();
iFs.Close();

}

so i want that the directory specified must be checked if a file of the specified name exists or not..


Wed, 2008-07-30 12:51
Joined: 2007-06-16
Forum posts: 52
Re: file searching

use

ConeUtils::FileExists()

ThanX&Regards
Vijay


ready to face

  • Login to reply to this topic.