Hi,
Where did you find it?
I don't see FileUtils here:
http://code.google.com/android/reference/classes.html#letter_F
thanks,
Anil

On Mar 8, 7:49 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Eureka! I found the following function:
>         File inputFile = new File(from);
>         File outputFile = new File(to);
>
>         FileUtils.copyFile(inputFile, outputFile);
>
> On 8 mar, 20:58, "Dan U." <[EMAIL PROTECTED]> wrote:
>
> > Alright, it looks like there won't be any security issues (that seems
> > odd), but you need to create the /data/b file prior to writing to it.
> > I simply used adb push to push an empty file there, although that's
> > not going to work for you, but you should be able to write code to
> > create it.
>
> > On Mar 8, 3:53 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
>
> > > While that might be an issue, I don't think it's the main issue. Using
> > > droid08s code (and with a flush()), I got a FileNotFoundException for
> > > b.
>
> > > On Mar 8, 2:47 pm, Pierre Neihouser <[EMAIL PROTECTED]> wrote:
>
> > > > Don't you need to call flush() on out before closing it ?
> > > > Just a guess...
>
> > > > On 8 mars 08, at 22:49, Dan U. wrote:
>
> > > > > I see. I'm gonna guess that it won't work due to security constraints.
> > > > > At least, that would make sense for it to be the problem. I don't know
> > > > > what the official Google answer would be to doing this, but I'd
> > > > > include instructions on how to manually install the files with adb.
>
> > > > > On Mar 8, 1:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > > > >> Thanks Dan.
>
> > > > >> I want to copy the location file (/data/misc/location)
> > > > >> programatically
> > > > >> but it doesn't work with the code I've sent.
>
> > > > >> On 8 mar, 17:52, "Dan U." <[EMAIL PROTECTED]> wrote:
>
> > > > >>> It looks like a permission issue. Can you try accessing the files
> > > > >>> in /
> > > > >>> data/data/<your apps namespace name>/files/
>
> > > > >>> On Mar 8, 12:38 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > > >>>> Any idea why does the following code write 0 bytes on "b",
> > > > >>>> despite of
> > > > >>>> "a" having data?
> > > > >>>> No exception is thrown; a permissions issue?
>
> > > > >>>>                    File inputFile = new File("/data/a");
> > > > >>>>                    File outputFile = new File("/data/b");
>
> > > > >>>>                    FileReader in = new FileReader(inputFile);
> > > > >>>>                    FileWriter out = new FileWriter(outputFile);
> > > > >>>>                    int c;
>
> > > > >>>>                    while ((c = in.read()) != -1)
> > > > >>>>                      out.write(c);
>
> > > > >>>>                    in.close();
> > > > >>>>                    out.close();
>
> > > > >>>> thanks, Droid
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to