mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Underscore the NIOFileSystem module (#2683)
Motivation: The 'NIOFileSystem' target isn't yet stable API and is made available via the '_NIOFileSystemModule' product. This doesn't make it obvious enough that the module isn't yet considered stable. Modifications: - Rename 'NIOFileSystem' and 'NIOFileSystemFoundationCompat' such that they are prefixed with '_'. Result: More obviously not stable API
This commit is contained in:
1 parent
b92e058cf8
commit
df5745d6be
33 files changed
+62
-60
No files matched your search
@@ -19,9 +19,9 @@
|
||||
/// You can create a ``BufferedWriter`` by calling
|
||||
/// ``WritableFileHandleProtocol/bufferedWriter(startingAtAbsoluteOffset:capacity:)`` on
|
||||
/// ``WritableFileHandleProtocol`` and write bytes to it with one of the following methods:
|
||||
/// - ``BufferedWriter/write(contentsOf:)-8dhyg``
|
||||
/// - ``BufferedWriter/write(contentsOf:)-2i7d9``
|
||||
/// - ``BufferedWriter/write(contentsOf:)-8ukvd`
|
||||
/// - ``BufferedWriter/write(contentsOf:)-1rkf6``
|
||||
/// - ``BufferedWriter/write(contentsOf:)-7cs3v``
|
||||
/// - ``BufferedWriter/write(contentsOf:)-66cts``
|
||||
///
|
||||
/// If a call to one of the write functions reaches the buffers ``BufferedWriter/capacity`` the
|
||||
/// buffer automatically writes its contents to the file.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# ``NIOFileSystem/DirectoryFileHandleProtocol``
|
||||
# ``_NIOFileSystem/DirectoryFileHandleProtocol``
|
||||
|
||||
## Topics
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# ``NIOFileSystem/FileHandleProtocol``
|
||||
# ``_NIOFileSystem/FileHandleProtocol``
|
||||
|
||||
## Topics
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# ``NIOFileSystem/FileSystemProtocol``
|
||||
# ``_NIOFileSystem/FileSystemProtocol``
|
||||
|
||||
## Topics
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# ``NIOFileSystem/ReadableFileHandleProtocol``
|
||||
# ``_NIOFileSystem/ReadableFileHandleProtocol``
|
||||
|
||||
## Topics
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
- ``bufferedReader(startingAtAbsoluteOffset:capacity:)``
|
||||
- ``readChunks(chunkLength:)``
|
||||
- ``readChunks(in:chunkLength:)-8of2k``
|
||||
- ``readChunks(in:chunkLength:)-4l2zx``
|
||||
- ``readChunks(in:chunkLength:)-8xhv9``
|
||||
- ``readChunks(in:chunkLength:)-ecdr``
|
||||
- ``readChunks(in:chunkLength:)-ecdr``
|
||||
- ``readChunks(in:chunkLength:)-8ty3f``
|
||||
- ``readChunks(in:chunkLength:)-2j7r7``
|
||||
- ``readChunks(in:chunkLength:)-63rn``
|
||||
- ``readChunks(in:chunkLength:)-3fxd``
|
||||
- ``readChunks(in:chunkLength:)-9oae1``
|
||||
- ``readChunks(in:chunkLength:)-7rjf6``
|
||||
- ``readChunks(in:chunkLength:)-7a8x2``
|
||||
- ``readToEnd(fromAbsoluteOffset:maximumSizeAllowed:)``
|
||||
|
||||
### Read part of a file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# ``NIOFileSystem/WritableFileHandleProtocol``
|
||||
# ``_NIOFileSystem/WritableFileHandleProtocol``
|
||||
|
||||
## Topics
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# ``NIOFileSystem``
|
||||
# ``_NIOFileSystem``
|
||||
|
||||
A file system library for Swift.
|
||||
|
||||
@@ -8,7 +8,7 @@ This module implements a file system library for Swift, providing ways to intera
|
||||
files. It provides a concrete ``FileSystem`` for interacting with the local file system in addition
|
||||
to a set of protocols for creating other file system implementations.
|
||||
|
||||
``NIOFileSystem`` is cross-platform with the following caveats:
|
||||
``_NIOFileSystem`` is cross-platform with the following caveats:
|
||||
- _Platforms don't have feature parity or system-level API parity._ Where this is the case these
|
||||
implementation details are documented. One example is copying files, on Apple platforms files are
|
||||
cloned if possible.
|
||||
@@ -24,7 +24,7 @@ to a set of protocols for creating other file system implementations.
|
||||
The following sample code demonstrates a number of the APIs offered by this module:
|
||||
|
||||
```swift
|
||||
import NIOFileSystem
|
||||
import _NIOFileSystem
|
||||
|
||||
// NIOFileSystem provides access to the local file system via the FileSystem
|
||||
// type which is available as a global shared instance.
|
||||
|
||||
@@ -153,7 +153,7 @@ public protocol FileHandleProtocol {
|
||||
///
|
||||
/// There are two requirements for implementing this protocol:
|
||||
/// 1. ``readChunk(fromAbsoluteOffset:length:)``, and
|
||||
/// 2. ``readChunks(in:chunkLength:)-8of2k``
|
||||
/// 2. ``readChunks(chunkLength:)
|
||||
///
|
||||
/// A number of overloads are provided which provide sensible defaults.
|
||||
///
|
||||
@@ -193,7 +193,7 @@ extension ReadableFileHandleProtocol {
|
||||
/// - range: A range of offsets in the file to read.
|
||||
/// - chunkLength: The length of chunks to read, defaults to 128 KiB.
|
||||
/// - as: Type of chunk to read.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-5ljvn``.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-2dz6``
|
||||
/// - Returns: An `AsyncSequence` of chunks read from the file.
|
||||
public func readChunks(
|
||||
in range: ClosedRange<Int64>,
|
||||
@@ -208,7 +208,7 @@ extension ReadableFileHandleProtocol {
|
||||
/// - range: A range of offsets in the file to read.
|
||||
/// - chunkLength: The length of chunks to read, defaults to 128 KiB.
|
||||
/// - as: Type of chunk to read.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-5ljvn``.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-2dz6``
|
||||
/// - Returns: An `AsyncSequence` of chunks read from the file.
|
||||
public func readChunks(
|
||||
in range: Range<Int64>,
|
||||
@@ -223,7 +223,7 @@ extension ReadableFileHandleProtocol {
|
||||
/// - range: A range of offsets in the file to read.
|
||||
/// - chunkLength: The length of chunks to read, defaults to 128 KiB.
|
||||
/// - as: Type of chunk to read.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-5ljvn``.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-2dz6``.
|
||||
/// - Returns: An `AsyncSequence` of chunks read from the file.
|
||||
public func readChunks(
|
||||
in range: PartialRangeFrom<Int64>,
|
||||
@@ -239,7 +239,7 @@ extension ReadableFileHandleProtocol {
|
||||
/// - range: A range of offsets in the file to read.
|
||||
/// - chunkLength: The length of chunks to read, defaults to 128 KiB.
|
||||
/// - as: Type of chunk to read.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-5ljvn``.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-2dz6``.
|
||||
/// - Returns: An `AsyncSequence` of chunks read from the file.
|
||||
public func readChunks(
|
||||
in range: PartialRangeThrough<Int64>,
|
||||
@@ -255,7 +255,7 @@ extension ReadableFileHandleProtocol {
|
||||
/// - range: A range of offsets in the file to read.
|
||||
/// - chunkLength: The length of chunks to read, defaults to 128 KiB.
|
||||
/// - as: Type of chunk to read.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-5ljvn``.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-2dz6``.
|
||||
/// - Returns: An `AsyncSequence` of chunks read from the file.
|
||||
public func readChunks(
|
||||
in range: PartialRangeUpTo<Int64>,
|
||||
@@ -271,7 +271,7 @@ extension ReadableFileHandleProtocol {
|
||||
/// - range: A range of offsets in the file to read.
|
||||
/// - chunkLength: The length of chunks to read, defaults to 128 KiB.
|
||||
/// - as: Type of chunk to read.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-5ljvn``.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-2dz6``.
|
||||
/// - Returns: An `AsyncSequence` of chunks read from the file.
|
||||
public func readChunks(
|
||||
in range: UnboundedRange,
|
||||
@@ -286,7 +286,7 @@ extension ReadableFileHandleProtocol {
|
||||
/// - range: A range of offsets in the file to read.
|
||||
/// - chunkLength: The length of chunks to read, defaults to 128 KiB.
|
||||
/// - as: Type of chunk to read.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-5ljvn``.
|
||||
/// - SeeAlso: ``ReadableFileHandleProtocol/readChunks(in:chunkLength:)-2dz6``.
|
||||
/// - Returns: An `AsyncSequence` of chunks read from the file.
|
||||
public func readChunks(
|
||||
chunkLength: ByteCount = .kibibytes(128)
|
||||
|
||||
Reference in new issue
Block a user