3 Commits
Author SHA1 Message Date
George Barnett 0e40bcb9ab Avoid overflow in tests where Int is 32-bit (#2626)
Motivation:

A filesystem test uses an `Int` which is too large to store in an `Int`
when `Int` is 32-bits wide. This is a compilation failure.

Modifications:

- Explicitly use `Int64`

Result:

Tests compile when `Int` is only 32-bits
2024-01-17 10:44:24 +00:00
George Barnett 756f25e3c3 Add additional guards in tests for mocking (#2624)
Motivation:

In #2615 some of the syscall tests use a mocking infrastrucutre which is
compiled out in release builds. The tests weren't correctly guarded for
this so fail to build in release mode.

Modifications:

- Add missing guards
- Add missing availability on tests

Result:

Tests compile in release mode
2024-01-16 07:56:08 -08:00
George Barnett f80c69f84b Add NIOFilesystem (#2615)
Motivation:

I/O is typically blocking, but options for interacting with the
filesystem using `async` APIs are limited. This change adds a new module
to NIO, `NIOFileSystem`. At the moment this is exposed as the
`_NIOFileSystem` product while users get a chance to try it out and
provide feedback.

During this time the API of `NIOFileSystem` is subject to change.
Breaking changes will come in _minor_ NIO releases and additive changes
may come in _patch_ releases of NIO.

Modifications:

- Add `NIOFileSystem`, `NIOFileSystemFoundationCompat`,
  `NIOFileSystemTests`, `NIOFileSystemIntegrationTests`, and
  `NIOFileSystemFoundationCompatTests`.
- Update docs
- Update CNIOLinux and CNIODarwin shims

Result:

File system can be accessed via `async` APIs
2024-01-16 03:30:26 -08:00