Bot releases are hidden (Show)
Minor update to fix SwiftLint and Xcode warnings
Xcode 14.2 used, minimum OS version updated (ex iOS: 12.0)
Published by phimage about 5 years ago
SwiftPM compatibility
Published by phimage about 5 years ago
Xcode project, SwiftPM, etc.. modified to swift 5 version. No code update.
Published by phimage about 6 years ago
Xcode 10, Swift 4.2 @IgorMuzyka
Published by phimage about 6 years ago
Xcode 9.3, Swift 4.1
Published by phimage about 6 years ago
Xcode 9, Swift 4.0
Published by nvzqz over 7 years ago
Published by nvzqz about 8 years ago
This release is mainly to make all current features available.
workingDirectory
to Process
createFile(_:)
create(_:)
methods to Path
and File
File
with NSData
typeTextFile
init(groupIdentifier:)
to Path
/
operator for appending pathsAllArray
and AllNames
in FileSystemEventFlags
to allFlags
and allFlagNames
.FileSystemEventFlags
FileSystemEventStream
is now private
NSFileManager
for Path
Path
instance now has a fileManagerDelegate
readFromPath
for NSData
now actually returns the contentscommonAncestor(_:)
method for Path
Published by nvzqz almost 9 years ago
FileType
is no longer a protocol for files. It is now an enumeration of types that a given file can be. The File
class is now the standard form of interacting with files.FileKit
enumeration to get info regarding the current version of FileKit
tvOS support 📺
DirectoryEnumerator
struct to enumerate through the files in a directory.
Settable path extension
A path's children can now be obtained recursively
let allFilesInHome = Path.UserHome.children(recursive: true)
String
and Path
concatenation with the +
operator
A changeDirectory(_:)
to Path
that changes the process' current working
directory to self
Path.UserDesktop.changeDirectory {
print(Path.Current) // "/Users/nvzqz/Desktop"
}
Getting a common ancestor between two paths with the <^>
operator and commonAncestor(_:)
method
Getting a resolved path with the *
postfix operator
Getting an NSFileHandle
for a File
or Path
Path
now conforms to SequenceType
// Prints all of the paths in the user's home directory
for path in Path.UserHome {
print(path)
}
Static readFromPath(_:)
method for Readable
types that returns Self
Path
now conforms to StringInterpolationConvertible
, which acts in the same way regular String
interpolation works.
let filePath: Path = "~/Desktop/File \(2)"
print(filePath.rawValue) // "~/Desktop/File 2"
A find
method with a search depth that maps a function on each path found and returns the non-nil results.
let documents = Path.UserDocuments.find(searchDepth: 1) { String($0) }
Initializers for NSString
and NSBundle
that take a Path
Getting an NSStream
for a File
or Path
File
now conforms to Comparable
according to size
FilePermissions
struct for seeing the permissions of the current process for a given file.
let swift: Path = "/usr/bin/swift"
print(swift.filePermissions) // FilePermissions[Read, Execute]
FileType
as a protocol for files
FileType
is now an enumeration of types that a file can be.File
is now the standard way of interacting with filesFKError
to FileKitError
•
postfix operator to %
for standardizing pathfindPaths
method to find
for Path
url
property to URL
and made it non-optionalfind
method now has -1
as its default searchDepth
writable
property for WritableConvertible
is now non-optional+
operator implementationPublished by nvzqz about 9 years ago
FKPath
instances is now defined by FKPath.FileManager
, which is set to NSFileManager.defaultManager()
by defaultNSDictionary
, NSArray
, and NSData
now conform to FKWritableToFile
message
property for FKError
that improves error loggingFKPath
now works with bookmark dataFKArrayFile
and FKDataFile
for NSArray
and NSData
respectivelyFKReadableFromFile
and FKWritableToFile
protocolsFKWritableConvertible
protocol with writable
property to make the conforming type FKWritable
FKPath.Volumes(_:)
that returns an FKPath
array of all mounted volumestouch(_:)
method for FKPath
that creates a file at the path if it doesn't exist or updates the modification dateFKPath
(isWritable
, isReadable
, isExecutable
, isDeletable
)Published by nvzqz about 9 years ago
Support for watchOS 2
Published by nvzqz about 9 years ago
FKPath
now has an attributes
property and properties for certain attributes
creationDate
modificationDate
ownerName
ownerID
groupName
groupID
extensionIsHidden
posixPermissions
fileReferenceCount
fileSize
filesystemFileNumber
fileType
FKPath.FileType
enum that can also be initialized with a raw value.FKPath
now has an isSymbolicLink
propertyPublished by nvzqz about 9 years ago
=>>
and =>!
symlinkToPath(_:)
method in FKFileType
would attempt to symbolically link the argument path to itself rather than the file's path to the argument.Published by nvzqz about 9 years ago
FKPath
now has its own pathExtension
property
Method for finding paths has been added to FKPath
You can find all paths with the "txt"
extension five folders deep into the Desktop with:
let textFiles = FKPath.UserDesktop.findPaths(searchDepth: 5) { path in
path.pathExtension == "txt"
}
Published by nvzqz about 9 years ago
~>>
and ~>!
FKPath
now has the same operations as FKFileType
FKPath
or FKFileType
(->>
, ->!
)FKPath
or FKFileType
(+>>
, +>!
)Published by nvzqz about 9 years ago
The components
property of FKPath
no longer takes into account a trailing
"/"
in the path.
let hasTrailing: FKPath = "/Users/"
let noTrailing: FKPath = "/Users"
print(hasTrailing.components.last == noTrailing.components.last) // true
exists
property for FKPath
name
property for FKFileType
createSymlinkToPath(_:)
method for FKPath
>>>
operator for FKPath
symlinks>>!
operator for FKPath
forced symlinksPublished by nvzqz about 9 years ago
Initial release of FileKit