Compare commits

...

2 Commits
main ... next

Author SHA1 Message Date
Shota Shimazu 1117148d4a
revise 2022-07-07 09:21:30 +09:00
Shota Shimazu 9d9360ef1a
upgrade minimum support version 2022-04-07 09:26:33 +09:00
8 changed files with 596 additions and 765 deletions

View File

@ -1 +1 @@
5.1.3
5.6

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = 'Fileable'
s.version = '1.1'
s.version = '1.3'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'Unix command like file management library for Swift.'
s.description = <<-DESC
Unix command like and objective file management library for Swift.
Unix command like and objective file management library for Swift.
DESC
s.homepage = 'https://github.com/shotastage/Fileable.swift/'
s.authors = { 'Shota Shimazu' => 'hornet.live.mf@gmail.com' }
s.source = { :git => 'https://github.com/shotastage/Fileable.swift.git', :tag => s.version }
s.ios.deployment_target = '10.0'
s.ios.deployment_target = '14.0'
s.source_files = 'Sources/**/*.{h,m,swift}'
end

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2017-2019 Shota Shimazu
Copyright (c) 2017-2022 Shota Shimazu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
// swift-tools-version:5.0
// swift-tools-version:5.6
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

View File

@ -7,7 +7,7 @@
//
import Foundation
import System
// Show file information
@ -32,8 +32,7 @@ extension Path {
/// Get home directory.
/// - returns: Return home directory path as a string.
public static var home: String {
let path = NSHomeDirectory()
return path
return NSHomeDirectory()
}
/// List contents of specific directory
@ -44,11 +43,10 @@ extension Path {
do {
try path = Path.fm.contentsOfDirectory(atPath: self.path)
} catch {
path = nil
}
return path
}
}
@ -57,13 +55,15 @@ extension Path {
// Check and Change file or directory permission
extension Path {
@available(macOS 11.0, *)
public var permission: Int {
get {
fatalError("This stored property is not implemented now!")
}
set {
fatalError("This stored property is not implemented now!")
let perms = FilePermissions(rawValue: CModeT(newValue))
}
}
}

View File

@ -19,6 +19,7 @@ class IOSDirsTest: XCTestCase {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
#if os(iOS)
func testIOSDir() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
@ -43,14 +44,15 @@ class IOSDirsTest: XCTestCase {
XCTAssertTrue(cacheDirectory.contains("Library/Caches"))
XCTAssertTrue(tmpDirectory.contains("tmp"))
}
#endif
#if os(iOS)
func testGetBundleFile() {
let path = Path.ios.getBundle(file: "unlocated.txt")
XCTAssertNil(path)
}
#endif
func testPerformanceExample() {
// This is an example of a performance test case.