FileWriter iPhone

42 views
Skip to first unread message

Maxime

unread,
Sep 1, 2010, 10:08:20 PM9/1/10
to phonegap
Hi,
can we write. txt file directly to the iPhone application in the www
directory with FileWriter ?

Thanks

Maxime

Shazron Abdullah

unread,
Sep 1, 2010, 10:20:22 PM9/1/10
to Maxime, phonegap
Technically yes you can (although not provided by the api), but you don't want to.

The txt file you write to www will NOT be backed up by iTunes if its in the www folder. Write it to Documents or the Library (paths are provided in the api). Documents are for user visible stuff (if you have UIFileSharing enabled - the user can see and upload/download to this folder in iTunes), Library is for app specific stuff. Both folders are backed up by iTunes.

> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com

Maxime

unread,
Sep 1, 2010, 10:28:17 PM9/1/10
to phonegap

Thank you, that answers my question!!!

The FileWriter and the FileWriter are very cool, I will use that for
backup lot of stuff..

Question..Do you know the maximum file size for a .txt file in the
Library folder ?

Shazron Abdullah

unread,
Sep 1, 2010, 10:50:32 PM9/1/10
to Maxime, phonegap
Don't think there's a quota per app -- as much as your device as space, is my guess.

Reply all
Reply to author
Forward
0 new messages