Is there a way to write a string , which is read from text field, to a .txt file?

```
NSString *input = [textfield text];

NSString *path = @"myText.txt";

[input writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:NULL];

```