Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
eonist committed Oct 15, 2023
1 parent 91ec7dd commit 4da54af
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ let package = Package(
name: "FileSugarTests", // The name of the test target
dependencies: ["FileSugar"]) // The dependencies of the test target
]
)
)
4 changes: 2 additions & 2 deletions Sources/FileSugar/FileAsserter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public final class FileAsserter {
// Check if a file exists at the given path
.fileExists(atPath: path)
}

/**
* Asserts if a directory has files
* ## Examples:
Expand All @@ -28,4 +28,4 @@ public final class FileAsserter {
// Check if the returned content is empty
.isEmpty ?? false
}
}
}
2 changes: 1 addition & 1 deletion Sources/FileSugar/FileUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ class FileUtils {
NSWorkspace.shared.selectFile(nil, inFileViewerRootedAtPath: expandedFilePath)
}
}
#endif
#endif
4 changes: 2 additions & 2 deletions Sources/FileSugar/common/String+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ extension String {
/**
* From user agnostic to absolute URL
*/
internal var tildePath: String {
internal var tildePath: String {
// Convert the string to an NSString and expand the tilde in the path
NSString(string: self).expandingTildeInPath
NSString(string: self).expandingTildeInPath
}
}
6 changes: 3 additions & 3 deletions Sources/FileSugar/path/FilePathAsserter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public final class FilePathAsserter {
public static func isAbsolute(_ path: String, pathSeperator: String = "/") -> Bool {
path.hasPrefix(pathSeperator) // Check if the path starts with the path separator
}

/**
* Tests if a path contains a relative path (i.e. "../")
* - Parameter path: The path to test
Expand All @@ -29,7 +29,7 @@ public final class FilePathAsserter {
// Check if the path starts with the path separator or "../"
path.hasPrefix(pathSeperator) || path.hasPrefix(".." + pathSeperator)
}

/**
* Tests if a path is a tilde path (i.e. starts with "~")
* - Parameter path: The path to test
Expand All @@ -38,4 +38,4 @@ public final class FilePathAsserter {
public static func isTildePath(_ path: String) -> Bool {
path.hasPrefix("~") // Check if the path starts with "~"
}
}
}
2 changes: 1 addition & 1 deletion Sources/FileSugar/path/FilePathParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public final class FilePathParser {
public static func fileName(path filePath: String, withExtension: Bool = true) -> String? {
guard let url: URL = path(filePath) else { return nil } // Get the URL from the file path
return fileName(url, withExtension) // Get the file name from the URL and return it
}
}
/**
* Returns the directory of the given file URL.
*
Expand Down

0 comments on commit 4da54af

Please sign in to comment.