         try! proj.batchUpdate(sourceRoot: sourceRoot) { updater in
             let fileName = "file.swift"
             let subgroupPath = subgroupNames.joined(separator: "/")
-            let filePath = "\(sourceRoot.string)\(mainGroupPath)/\(subgroupPath)/\(fileName)"
-            Files.createFile(atPath: filePath, contents: nil, attributes: nil)
-            let file = try updater.addFile(to: project, at: Path(filePath))
+            let filePath = Path("\(sourceRoot.string)\(mainGroupPath)/\(subgroupPath)/\(fileName)")
+            try Data().write(to: filePath.url)
+            let file = try updater.addFile(to: project, at: filePath)
             let fileFullPath = try file.fullPath(sourceRoot: sourceRoot)
             XCTAssertEqual(
                 fileFullPath,
-                Path(filePath)
+                filePath
             )
         }
 

        try! proj.batchUpdate(sourceRoot: sourceRoot) { updater in
            let fileName = "file.swift"
            let subgroupPath = subgroupNames.joined(separator: "/")
            let filePath = "\(sourceRoot.string)\(mainGroupPath)/\(subgroupPath)/\(fileName)"
            Files.createFile(atPath: filePath, contents: nil, attributes: nil)
            let firstFile = try updater.addFile(to: project, at: Path(filePath))
            let parentGroup = proj.groups.first(where: { $0.path == subgroupNames.last! })!
            let secondFile = try updater.addFile(to: parentGroup, fileName: fileName)
            let firstFileFullPath = try firstFile.fullPath(sourceRoot: sourceRoot)
            let secondFileFullPath = try secondFile.fullPath(sourceRoot: sourceRoot)
            XCTAssertEqual(
                firstFileFullPath,
                Path(filePath)
            )
            XCTAssertEqual(
                secondFileFullPath,
                Path(filePath)
            )
            XCTAssertEqual(
                firstFile,

        let mainGroup = project.mainGroup!
        try! proj.batchUpdate(sourceRoot: sourceRoot) { updater in
            let fileName = "file.swift"
            let filePath = Path("\(sourceRoot.string)\(mainGroupPath)/\(fileName)")
            try Data().write(to: filePath.url)
            let file = try updater.addFile(to: mainGroup, fileName: fileName)
            let fileFullPath = try file.fullPath(sourceRoot: sourceRoot)
            XCTAssertEqual(
                fileFullPath,
                filePath
            )
        }

