Skip to content

Commit 7523ff7

Browse files
committed
Remove FileSugar dep
1 parent d823ead commit 7523ff7

File tree

4 files changed

+9
-20
lines changed

4 files changed

+9
-20
lines changed

Package.resolved

Lines changed: 0 additions & 14 deletions
This file was deleted.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ let package = Package(
1111
targets: ["Logger"]) // Targets that are part of the library
1212
],
1313
dependencies: [
14-
.package(url: "https://github.com/eonist/FileSugar.git", branch: "master") // Dependencies of the package
14+
// .package(url: "https://github.com/eonist/FileSugar.git", branch: "master") // Dependencies of the package
1515
],
1616
targets: [
1717
.target(
1818
name: "Logger", // Name of the target
19-
dependencies: ["FileSugar"]), // Dependencies of the target
19+
dependencies: [/*"FileSugar"*/]), // Dependencies of the target
2020
.testTarget(
2121
name: "LoggerTests", // Name of the test target
2222
dependencies: ["Logger"]) // Dependencies of the test target

Sources/Logger/util/LogType.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Foundation// Import the Foundation framework for basic data types and operations
2-
import FileSugar// Import the FileSugar framework for file system operations
2+
//import FileSugar// Import the FileSugar framework for file system operations
33
/**
44
* LogType
55
* - Description: This enum defines the different types of logging that can be performed.
@@ -125,4 +125,4 @@ extension Data {
125125
try write(to: fileURL, options: .atomic)
126126
}
127127
}
128-
}
128+
}

Tests/LoggerTests/LoggerTests.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import XCTest
22
import Logger
3-
import FileSugar
3+
//import FileSugar
44
/**
55
* LoggerTests class inherits from XCTestCase
66
*/
@@ -76,7 +76,10 @@ extension LoggerTests {
7676
Logger.type = .file(tempFilePath)
7777
Logger.debug("Test")
7878
Swift.print("LogType.tempFilePath: \(tempFilePath)")
79-
let fileExists: Bool = FileAsserter.exists(path: tempFilePath)
79+
80+
// Check if a file exists at the given path
81+
82+
let fileExists: Bool = FileManager().fileExists(atPath: tempFilePath)
8083
Swift.print("fileExists\(fileExists ? "" : "🚫")")
8184
XCTAssertTrue(fileExists)
8285
}

0 commit comments

Comments
 (0)