Added missing documentation to the source code in the Playdate bindings target.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
extension File {
|
||||
/// The origin used by `Handle.seek(to:from:)`.
|
||||
public enum SeekOrigin: Int32, Sendable {
|
||||
/// Relative to the beginning of the file.
|
||||
case start = 0
|
||||
/// Relative to the current offset.
|
||||
case current = 1
|
||||
/// Relative to the end of the file.
|
||||
case end = 2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
internal import CPlaydate
|
||||
|
||||
/// The cached `playdate->file` C API table.
|
||||
var fileAPI: UnsafePointer<playdate_file> { Playdate.fileAPI.unsafelyUnwrapped }
|
||||
|
||||
/// The most recent file system error as a thrown error.
|
||||
@@ -8,6 +9,9 @@ func lastFileError() -> PlaydateError {
|
||||
}
|
||||
|
||||
/// The file API: access to the game's Data directory and pdx contents.
|
||||
///
|
||||
/// Paths are relative to the game's Data directory (read/write) or the
|
||||
/// game's pdx (read-only), depending on the mode used to open them.
|
||||
public enum File {}
|
||||
|
||||
extension File {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
extension File {
|
||||
/// Information about a file or directory, mirroring `FileStat`.
|
||||
public struct Stat: Sendable {
|
||||
/// Whether the path is a directory.
|
||||
public let isDirectory: Bool
|
||||
/// The file's size, in bytes.
|
||||
public let size: UInt32
|
||||
/// The time the file was last modified.
|
||||
public let modified: System.DateTime
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user