mirror of
https://github.com/apple/swift-nio.git
synced 2026-05-20 20:30:36 +00:00
6b33489e64
This re-enables documentation lost during refactoring work, under the target _NIOFileSystem resolves #3474 ### Motivation: During the refactoring of NIOFileSystem and recent Swift updates, the mechanism to "shadow" symbols using `@_exported import` has stopped working for documentation and imports for symbols, which means that _NIOFileSystem is the target that needs to host the documentation for this (for now) ### Modifications: Moves DocC catalog into _NIOFileSystem target, and updates disambiguation hashes on overloaded symbols in order to verify no warnings are presented while generating documentation. Updates .spi.yml to present _NIOFileSystem instead of NIOFileSystem ### Result: Previous documentation should be available again, although at a slightly different URI structure within Swift Package Index. Co-authored-by: Cory Benfield <lukasa@apple.com>
1.2 KiB
1.2 KiB
_NIOFileSystem/FileSystemProtocol
Topics
Opening files with managed lifecycles
Files and directories can be opened and have their lifecycles managed by using the following methods:
withFileHandle(forReadingAt:options:execute:)withFileHandle(forWritingAt:options:execute:)withFileHandle(forReadingAndWritingAt:options:execute:)withDirectoryHandle(atPath:options:execute:)
Opening files
Files and directories can be opened using the following methods. The caller is responsible for closing it to avoid leaking resources.
openFile(forReadingAt:)openFile(forWritingAt:options:)openFile(forReadingAndWritingAt:options:)openDirectory(atPath:options:)
File information
info(forFileAt:infoAboutSymbolicLink:)
Symbolic links
createSymbolicLink(at:withDestination:)destinationOfSymbolicLink(at:)
Managing files
copyItem(at:to:strategy:shouldProceedAfterError:shouldCopyItem:)removeItem(at:)moveItem(at:to:)replaceItem(at:withItemAt:)createDirectory(at:withIntermediateDirectories:permissions:)
System directories
currentWorkingDirectorytemporaryDirectorywithTemporaryDirectory(prefix:options:execute:)