|
|
User login
Feeds |
The File Server...
|
|||||
| Fri, 2005-08-19 02:53 | |
|
Hi, I'd like to ask about the file server connection... I'm sorry i you're gonna say that I should read the docs... It's just that I've just woken up
and doing this is like... Uhmmm... My breakfast... So please understand if I'm a bit a little out of myself right now... So let's get into the question...1. How do I connect to a file server? 2. What Header does RFs belong to? 3. How do I use it with TFindFile? Suppose I use it to find all .gif files in my directory... I'll be reading more about this... Hopefully... Your responses would help me understand this a lot better.... Thanks! ![]() |
|
Forum posts: 50
RFs FileSession;
CDir *dirList = NULL;
TInt8 i;
TBuf<256> totalPath;
TBuf<50> fileName;
TInt n;
_LIT( KDirName, "c:\\System\\Apps\\Bmpmanip\\" );
_LIT( KFileSpec,"c:\\System\\Apps\\Bmpmanip\\*.gif" );
void CBmpmanipAppView::ConstructL(const TRect& aRect)
{
// Create a window for this application view
CreateWindowL();
// Set the windows size
SetRect(aRect);
// Activate the window, which makes it ready to be drawn
ActivateL();
//Initialize file iterator to zero
n=0;
//Make a list of gif files and put them into an array
GetFilesL();
iBitmap = new (ELeave) CFbsBitmap();
iRotator = CMdaBitmapRotator::NewL();
iFileSaver = CMdaImageBitmapToFileUtility::NewL(*this);
iScaler = CMdaBitmapScaler::NewL();
iConverter = CMdaImageFileToBitmapUtility::NewL(*this);
//Start an asynchronous process to open the gif file
iConverter->OpenL(fileName[n]);
}
void CBmpmanipAppView::GetFilesL()
{
FileSession.Connect();
if( KErrNone != FileSession.GetDir(KFileSpec,KEntryAttMaskSupported,ESortByName,dirList) )
{
return;
}
for( i=0;i<dirList->Count();i++ )
{
fileName = (*dirList)[i].iName;
totalPath = KDirName;
totalPath.Append( _L("\\") );
totalPath.Append( fileName );
}
if( dirList )
{
delete dirList;
dirList = NULL;
}
FileSession.Close();
}
Hmmm... What I intent to do is get the first image stored in in TBuf fileName... I can't figure out what I've been doing wrong... I get the following error messages...
Reason: cannot convert from 'unsigned short' to 'const class TDesC16'
No constructor could take the source type, or constructor overload resolution was ambiguous
Bmpmanipdocument.cpp
Eikonenvironment.cpp
Bmpmanip.uid.cpp
Generating Code...
Error executing cl.exe.
BMPMANIP.APP - 1 error(s), 0 warning(s)
I'd really really really appreciate your help... Thanks!
Forum posts: 7
how can u send it as fileName[i];
instead decleare rpointerarray<hbufc *> filenames;
then filenames.Insert(fileName.Alloc(),position);
now u canpass it as openL(filenames[i]);