Skip to content

Commit 2467cd0

Browse files
committed
implement symlink for LocalFileSystem
1 parent dc4027b commit 2467cd0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/TSCBasic/FileSystem.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ private class LocalFileSystem: FileSystem {
349349
try FileManager.default.createDirectory(atPath: path.pathString, withIntermediateDirectories: recursive, attributes: [:])
350350
}
351351

352+
func createSymbolicLink(_ path: AbsolutePath, pointingAt destination: AbsolutePath) throws {
353+
try FileManager.default.createSymbolicLink(atPath: path.pathString, withDestinationPath: destination.pathString)
354+
}
355+
352356
func readFileContents(_ path: AbsolutePath) throws -> ByteString {
353357
// Open the file.
354358
let fp = fopen(path.pathString, "rb")

0 commit comments

Comments
 (0)