Skip to content

Commit

Permalink
Create documents directory
Browse files Browse the repository at this point in the history
  • Loading branch information
timshadel committed Aug 12, 2016
1 parent dbc2704 commit d20959d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DVR/Tests/SessionUploadTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ class SessionUploadTests: XCTestCase {
func writeDataToFile(data: NSData, fileName: String) -> NSURL {
let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0]
let documentsURL = NSURL(fileURLWithPath: documentsPath, isDirectory: true)

do {
try NSFileManager.defaultManager().createDirectoryAtURL(documentsURL, withIntermediateDirectories: true, attributes: nil)
} catch {
XCTFail("Failed to create documents directory \(documentsURL). Error \(error)")
}

let url = documentsURL.URLByAppendingPathComponent(fileName + ".tmp")

Expand Down

0 comments on commit d20959d

Please sign in to comment.