Hi Guys,

Thanks for your kind help.I am a pretty new to DOTNET2.0.

Currenttly, I want to develop some app on PocketPC to Manage file.
I can create a new File call streamreader or streamwriter.
but It does not fill up what I am doing.

I want to create a Folder, and then create some files under that folder.
somehow, I want to delete an existed file or rename an existed file.

when I read DOTNET API, sorry, I can not find the exactly API.

Is there any way to implement this function directly under DOTNET?
or I must dllimport core.dll to use C++ Golobal Function.
such as CreateDirectory, FindFisrtFile to return a file handle to operate
this function?
If things like this, Is it kind of sucks?

Thanks

RE: Rename File, DeleteFile, Create Directory in CF2.0 by jeff

jeff
Thu Feb 15 10:04:35 CST 2007


Sorry, I have found this function.


"jeff" wrote:

> Hi Guys,
>
> Thanks for your kind help.I am a pretty new to DOTNET2.0.
>
> Currenttly, I want to develop some app on PocketPC to Manage file.
> I can create a new File call streamreader or streamwriter.
> but It does not fill up what I am doing.
>
> I want to create a Folder, and then create some files under that folder.
> somehow, I want to delete an existed file or rename an existed file.
>
> when I read DOTNET API, sorry, I can not find the exactly API.
>
> Is there any way to implement this function directly under DOTNET?
> or I must dllimport core.dll to use C++ Golobal Function.
> such as CreateDirectory, FindFisrtFile to return a file handle to operate
> this function?
> If things like this, Is it kind of sucks?
>
> Thanks
>

Re: Rename File, DeleteFile, Create Directory in CF2.0 by ctacke/>

ctacke/>
Thu Feb 15 10:09:21 CST 2007

System.IO.File.Move would probably be pretty useful. So would
System.IO.Directory.CreateDirectory.


--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--



"jeff" <jeff@discussions.microsoft.com> wrote in message
news:9DDD8CEE-B3C3-4F28-BED5-40DFA68EA8F7@microsoft.com...
> Hi Guys,
>
> Thanks for your kind help.I am a pretty new to DOTNET2.0.
>
> Currenttly, I want to develop some app on PocketPC to Manage file.
> I can create a new File call streamreader or streamwriter.
> but It does not fill up what I am doing.
>
> I want to create a Folder, and then create some files under that folder.
> somehow, I want to delete an existed file or rename an existed file.
>
> when I read DOTNET API, sorry, I can not find the exactly API.
>
> Is there any way to implement this function directly under DOTNET?
> or I must dllimport core.dll to use C++ Golobal Function.
> such as CreateDirectory, FindFisrtFile to return a file handle to operate
> this function?
> If things like this, Is it kind of sucks?
>
> Thanks
>



RE: Rename File, DeleteFile, Create Directory in CF2.0 by NinoBenvenuti

NinoBenvenuti
Thu Feb 15 10:23:58 CST 2007

Hi Jeff,

Have you looked at the File class in the System.IO[1] namespace? If File
does't accomplish all you need, there should be other classes in System.IO to
help you. There should be no need for you to P/Invoke.

[1]http://msdn2.microsoft.com/en-us/library/system.io.file.aspx

--
Nino Benvenuti
Device Application Development MVP
http://nino.net/blog


"jeff" wrote:

> Hi Guys,
>
> Thanks for your kind help.I am a pretty new to DOTNET2.0.
>
> Currenttly, I want to develop some app on PocketPC to Manage file.
> I can create a new File call streamreader or streamwriter.
> but It does not fill up what I am doing.
>
> I want to create a Folder, and then create some files under that folder.
> somehow, I want to delete an existed file or rename an existed file.
>
> when I read DOTNET API, sorry, I can not find the exactly API.
>
> Is there any way to implement this function directly under DOTNET?
> or I must dllimport core.dll to use C++ Golobal Function.
> such as CreateDirectory, FindFisrtFile to return a file handle to operate
> this function?
> If things like this, Is it kind of sucks?
>
> Thanks
>