hi all! i was just wondering what the current state of swift-system
is. i’m finding a lot of my projects are starting to get bottlenecked by the lack of APIs that have not yet been implemented in SystemPackage
. however, the repo doesn’t seem to have had a lot of activity recently. is this package still being developed?
Should this topic be moved to the dedicated subcategory?
Are the missing features listed in the API Roadmap?
My guess is that the string processing and regex proposals are prioritized for now.
It is! Due to the package being API & ABI stable on apple platforms, making changes to the package takes a lot of careful work and many of the primary contributors are caught up with other work. (As @benrimmington mentioned, @Michael_Ilseman is working on the regex proposals.)
I have also been meaning to finish up my work on the stat.h
wrappers but have been extremely busy with other projects.
well, for example, i’ve been needing some directory-related capabilities such as:
- creating a directory (like
mkdir
) - iterating through files in a directory
but i don’t see anything related to that in the API roadmap (unless it’s being referred to by a name i don’t recognize).
this was sparked by the realization that i’m currently expending an extraordinary amount of effort trying to avoid interacting with the file system, simply because the API of SystemPackage
is so limited.
when deploying to desktop, i would just use Foundation APIs instead. but i’m deploying to a server environment with very little memory available, where quite literally every megabyte counts. so loading a giant framework like Foundation is a no-go. (i’m linking dynamically because static linking apparently does not agree with SwiftSyntax…)
For 2. You can use:
If you like…
that looks a lot like what i need, thanks!!
Not that I want to devalue the great work of the system team, but… perhaps we could move faster if we as a community would collaborate on a common swift posix library. There are quite a few out there, but all incomplete and with different focus.
Super. If it’s not obvious to others it allows for simple iteration thus:
for file in directoryPath.directoryEntries {
…
}
I think those are covered by the future work on FilePath for operations that consult the file system:
- FilePath semantic (i.e. file-system interacting) operations
stat
,chown
, directory iteration, etc.- temporary files
The previous FilePath API review was for "syntactic operations" which don't need any system calls.