Thanks Mark for the info. Let me try these....

On Mar 17, 1:25 pm, Mark Murphy <[email protected]> wrote:
> dillipk wrote:
> > Hi,
> > I am new to Android development. I was wondering how the file
> > operations works in Android. As in J2ME it has FileConnection class
> > that takes care of most of the File operation tasks.. and it
> > FileConnection doesn't support Android, what is the best way to
> > accomplish the File Operation tasks? I would appreciate if someone
> > could send me some code snippet: Thanks..
>
> http://exampledepot.com/egs/java.io/pkg.html
>
> The above link should have everything you need for standard Java I/O.
>
> > Tasks I want to do :
>
> > 1) Create a Directory( check for its existence first, if not then
> > create it)
> > 2) Create a File in the newly created Directory
> > 3) Write data into the file
> > 4) Read from the file
> > 5) Delete the file
>
> That is standard Java I/O. See the above link.
>
> > I want to create the file in Built-in memory or SDCard.. so for this,
> > how do I specify the PATH.?
>
> Use getFilesDir() on Activity (or any Context) to get the app-local file
> storage area. Use Environment.getExternalStorageDirectory() to get the
> path to the SD card.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to