Created
October 28, 2014 12:41
-
-
Save below/2b652f066dc0a5059aa4 to your computer and use it in GitHub Desktop.
Swift FileHandle Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playground - noun: a place where people can play | |
import Cocoa | |
import XCPlayground | |
let path = XCPSharedDataDirectoryPath + "log.txt" | |
let fileURL = NSURL(fileURLWithPath: path) | |
if (fileURL != nil) { | |
var error : NSError? = nil; | |
let fileHandle = NSFileHandle(forWritingToURL: fileURL!, error:&error) | |
print(error) | |
if (error == nil) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment