for questions concerning the writeToFile method, part of the NSData class in OS X and iOS
-4
votes
1answer
28 views
Does exists a similar function to writeToFile and archiveRootObject for iOS in Android? [on hold]
On iOS I use these lines of code to store a large String (JSon)... How can I do the same on Android? What is a file place to put that string?
Thanks
NSArray *paths = ...
0
votes
0answers
27 views
Not able to get the saved data bytes when reading the same file
I am writing NSMutableData to image file using writeToFile with the below code.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString ...
0
votes
1answer
13 views
NSMutableDictionary writeToFile fails with more than one item
i've googled all over about this, couldn't find a solution: I an using a standard NSMutableDictionary writeToFile method which keeps failing if my dictionary has MORE THAN ONE item, containing a ...
0
votes
1answer
11 views
NSdata writeToURL not working
i'm trying to save a NsData file into a directory. that is the code of my method:
- (void)cacheImage:(NSData *)imageData withTitle:(NSString *)title
{
NSURL *cacheURL = (NSURL ...
0
votes
2answers
18 views
VB.Net - List files & subfolders from a specified Directory and save to a text document, and sort results
I am working on a project that requires me to search and list all files in a folder that could have multiple sub folders and write it to text documents.
Primarily the file extension i will be ...
-6
votes
0answers
34 views
How to download from url and update an existing file in iOS? [duplicate]
I read some replies from stackoverflow about my problem. I tried all methods, but it is not working.
I have a local database in my application. What I want is, every time I start my application it ...
-1
votes
2answers
33 views
Unable to create Plist of NSStrings
hi am trying to create a plist of my calculations but it turns out the list is empty....pls help here is my code.is there any othe way to write strings to a file other than this...
-(float)calculate
...
0
votes
0answers
16 views
NSMutableDictionary writeToFile only gives out (null)
i've got the problem, that I have a NSMutableArray with some strings in it and I want to write that back to my property list.
So I do: [dict1 writeToFile:plistPath atomically:YES];
But when I leave ...
1
vote
2answers
97 views
NSData writeToFile works on simulator but not on device
In my iphone app I am downloading some number of images from the web. It doesn't matter if it blocks the UI thread, in fact it needs to block UI thread till fully downloaded. Once done, I notify the ...
0
votes
1answer
32 views
Preventing Overwrite When Calling writeToFile:
I'm trying to save an image to the disk every time a save button is pressed. This is the code I'm using:
NSArray* documentDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, ...
0
votes
3answers
53 views
NSFileManager: removing item
The problem is removing an item that´s been written using writeToFile: method, I cannot seem to remove it. I tried NSFileManager but I guess these are two different types of storage.
- (BOOL) ...
-1
votes
1answer
33 views
How To write to a specific part of a text file c#
I have a the following : AccountNumber , AccountName , City.
This values represents a Customer. I have 20 Customers.
I need to write to a new text file each Customer in a different line.
But the main ...
0
votes
1answer
37 views
Writing to /tmp folder iPad
I´m writing certain values to a file. See Write Operations below.
This works fine when using iPad 6.1 Simulator.
When trying the same thing on my iPad it fails. I think it´s something with ...
1
vote
1answer
88 views
Unable to Read/write plist
I've looked into other users similar problems but I still can't find the problem with my code.
Here is the problem.
When the app start I call a method called setupDirectory that create (or copy from ...
1
vote
2answers
67 views
Write arraylist with different objects to file
i'm trying to write an ArrayList, with different objects in it, to a file. This is my ArrayList:
ArrayList<Person> personList = new ArrayList<Person>();
private Person theCaptain;
...