Nsdata write to file error




















This also allows the kernel to discard the data loaded from memory when the system is running low on memory. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. FromFile String. Creates an NSData by loading the contents of the specified file into memory. Applies to.

I am trying to write an nsdata to a file on my disk, I have the following code and it doesn't work, am i doing anything wrong? Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Write NSData to a file? Ask Question. Asked 11 years, 4 months ago. Active 11 years, 4 months ago. Viewed 30k times. Improve this question. I've had the same problem in a multi-threaded application. Add a comment.

Active Oldest Votes. Improve this answer. John Franklin John Franklin 4, 1 1 gold badge 21 21 silver badges 27 27 bronze badges. Foundation classes may put other objects or fake errors or even garbage in the error argument. That's not to say that they do , but it's part of the programmer contract that they can, so be careful. I have a side question a bit off topic from the documents:Discussion This method may not be appropriate when writing to publicly accessible files.

To securely write data to a public location, use NSFileHandle instead.



0コメント

  • 1000 / 1000