mirror of
https://github.com/apple/swift-system
synced 2026-11-22 04:30:46 +00:00
update method name
This commit is contained in:
1 parent
7661e95acf
commit
0ff423fe26
3 files changed
+14
-12
No files matched your search
@@ -22,14 +22,16 @@ extension FileDescriptor {
|
||||
///
|
||||
/// The corresponding C function is `fstat`.
|
||||
@_alwaysEmitIntoClient
|
||||
public func fileStatus(retryOnInterrupt: Bool = true) throws -> FileStatus {
|
||||
try _fileStatus(
|
||||
public func getFileStatus(
|
||||
retryOnInterrupt: Bool = true
|
||||
) throws -> FileStatus {
|
||||
try _getFileStatus(
|
||||
retryOnInterrupt: retryOnInterrupt
|
||||
).get()
|
||||
}
|
||||
|
||||
@usableFromInline
|
||||
internal func _fileStatus(
|
||||
internal func _getFileStatus(
|
||||
retryOnInterrupt: Bool = true
|
||||
) -> Result<FileStatus, Errno> {
|
||||
var result = CInterop.Stat()
|
||||
|
||||
@@ -27,18 +27,18 @@ extension FilePath {
|
||||
///
|
||||
/// The corresponding C functions are `stat` and `lstat`.
|
||||
@_alwaysEmitIntoClient
|
||||
public func stat(
|
||||
public func getFileStatus(
|
||||
followSymlinks: Bool = true,
|
||||
retryOnInterrupt: Bool = true
|
||||
) throws -> FileStatus {
|
||||
try _stat(
|
||||
try _getFileStatus(
|
||||
followSymlinks: followSymlinks,
|
||||
retryOnInterrupt: retryOnInterrupt
|
||||
).get()
|
||||
}
|
||||
|
||||
@usableFromInline
|
||||
internal func _stat(
|
||||
internal func _getFileStatus(
|
||||
followSymlinks: Bool,
|
||||
retryOnInterrupt: Bool
|
||||
) -> Result<FileStatus, Errno> {
|
||||
@@ -70,12 +70,12 @@ extension FilePath {
|
||||
///
|
||||
/// The corresponding C function is `fstatat`.
|
||||
@_alwaysEmitIntoClient
|
||||
public func stat(
|
||||
public func getFileStatus(
|
||||
relativeTo fd: FileDescriptor,
|
||||
fcntrl: FileDescriptor.ControlFlags,
|
||||
retryOnInterrupt: Bool = true
|
||||
) throws -> FileStatus {
|
||||
try _fstatat(
|
||||
try _getFileStatus(
|
||||
relativeTo: fd,
|
||||
fcntrl: fcntrl,
|
||||
retryOnInterrupt: retryOnInterrupt
|
||||
@@ -83,7 +83,7 @@ extension FilePath {
|
||||
}
|
||||
|
||||
@usableFromInline
|
||||
internal func _fstatat(
|
||||
internal func _getFileStatus(
|
||||
relativeTo fd: FileDescriptor,
|
||||
fcntrl: FileDescriptor.ControlFlags,
|
||||
retryOnInterrupt: Bool
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
// MARK: - stat
|
||||
// int stat(const char *, struct stat *)
|
||||
// int lstat(const char *, struct stat *)
|
||||
// FilePath.fileStatus(followSymlinks:) throws Errno -> FileStatus
|
||||
// FilePath.getFileStatus(followSymlinks:) throws Errno -> FileStatus
|
||||
|
||||
// int fstatat(int, const char *, struct stat *, int)
|
||||
// FilePath.fileStatus(relativeTo:controlFlags:) throws Errno -> FileStatus
|
||||
// FilePath.getFileStatus(relativeTo:controlFlags:) throws Errno -> FileStatus
|
||||
|
||||
// int fstat(int, struct stat *)
|
||||
// FileDescriptor.fileStatus() throws Errno -> FileStatus
|
||||
// FileDescriptor.getFileStatus() throws Errno -> FileStatus
|
||||
|
||||
|
||||
// MARK: - chmod
|
||||
|
||||
Reference in new issue
Block a user