Bulk update of the public corpus from /Users/mmj/.cupertino-dev/, the local source that built v1.0.0 / v1.0.1 release database bundles. - docs/: 1,739 new pages, 403,381 modified (schema upgrade to the structured-page format used by v1.0+: overview, rawMarkdown, sections[].items[]). Total 404,568 page JSONs (2.4 GB). - packages/: 1,587 packages (1.5 GB), previously empty in this repo. Includes per-package source archives and READMEs for the curated Swift package set. Some packages (notably swiftlang/swift-foundation-icu) ship 50-100 MB ICU lookup tables — under GitHub's 100 MB limit. No deletions: existing files not in .cupertino-dev are preserved (e.g. swift-org/ has 81 historical pages this update doesn't touch).
94 lines
6.8 KiB
JSON
94 lines
6.8 KiB
JSON
{
|
|
"abstract" : "Schedules an asynchronous write operation using the specified file descriptor.",
|
|
"availability" : [
|
|
{
|
|
"beta" : false,
|
|
"deprecated" : false,
|
|
"introducedAt" : "5.0",
|
|
"name" : "iOS",
|
|
"unavailable" : false
|
|
},
|
|
{
|
|
"beta" : false,
|
|
"deprecated" : false,
|
|
"introducedAt" : "5.0",
|
|
"name" : "iPadOS",
|
|
"unavailable" : false
|
|
},
|
|
{
|
|
"beta" : false,
|
|
"deprecated" : false,
|
|
"introducedAt" : "13.1",
|
|
"name" : "Mac Catalyst",
|
|
"unavailable" : false
|
|
},
|
|
{
|
|
"beta" : false,
|
|
"deprecated" : false,
|
|
"introducedAt" : "10.7",
|
|
"name" : "macOS",
|
|
"unavailable" : false
|
|
},
|
|
{
|
|
"beta" : false,
|
|
"deprecated" : false,
|
|
"name" : "tvOS",
|
|
"unavailable" : false
|
|
},
|
|
{
|
|
"beta" : false,
|
|
"deprecated" : false,
|
|
"introducedAt" : "1.0",
|
|
"name" : "visionOS",
|
|
"unavailable" : false
|
|
},
|
|
{
|
|
"beta" : false,
|
|
"deprecated" : false,
|
|
"introducedAt" : "2.0",
|
|
"name" : "watchOS",
|
|
"unavailable" : false
|
|
}
|
|
],
|
|
"codeExamples" : [
|
|
|
|
],
|
|
"contentHash" : "6852a3a2b967dd73b48ea52f0b3caf10ed6b26087b00b07fd997e60986b4d54e",
|
|
"crawlDepth" : 4,
|
|
"crawledAt" : "2026-05-03T05:37:53Z",
|
|
"declaration" : {
|
|
"code" : "extern void dispatch_write(dispatch_fd_t fd, dispatch_data_t data, dispatch_queue_t queue, void (^handler)(dispatch_data_t data, int error));",
|
|
"language" : "swift"
|
|
},
|
|
"id" : "EC557B44-16A4-3897-522F-8B1FED3E9FDF",
|
|
"kind" : "function",
|
|
"language" : "occ",
|
|
"module" : "Dispatch",
|
|
"overview" : "## Discussion\n\nThis is a convenience function for initiating a single, asynchronous write operation at the current position of the specified file descriptor. This method is intended for simple operations where you do not need the overhead of creating a channel and do not plan on issuing more than a few calls to read or write data. Once submitted, there is no way to cancel the write operation.\n\nAfter calling this function, the system takes control of the specified file descriptor until the handler block is enqueued. While it controls the file descriptor, the system may modify it on behalf of the application. For example, the system typically adds the `O_NONBLOCK` flag to ensure that any operations are non-blocking. During that time, it is an error for your application to modify the file descriptor directly. However, you may pass the file descriptor to this function or the [doc:\/\/com.apple.dispatch\/documentation\/Dispatch\/dispatch_read] function. You may also use the file descriptor to create a new dispatch I\/O channel. The system relinquishes control of the file descriptor before calling your handler, so it is safe to modify the file descriptor again from your handler code.\n\nThe `handler` you provide is not queued for execution until the write operation finishes. In addition, if you issue multiple read or write calls for the same file descriptor using the convenience APIs, all of those operations must complete before any of the associated handlers are queued. If you are already using the file descriptor with another channel, you should use the [doc:\/\/com.apple.dispatch\/documentation\/Dispatch\/DispatchIO\/write(offset:data:queue:ioHandler:)] function to write data to the channel rather than use this function.",
|
|
"platforms" : [
|
|
"iOS",
|
|
"iPadOS",
|
|
"Mac Catalyst",
|
|
"macOS",
|
|
"tvOS",
|
|
"visionOS",
|
|
"watchOS"
|
|
],
|
|
"rawMarkdown" : "---\nsource: https:\/\/developer.apple.com\/documentation\/dispatch\/dispatch_write\ncrawled: 2026-05-03T05:37:53Z\n---\n\n# dispatch_write\n\n**Function**\n\nSchedules an asynchronous write operation using the specified file descriptor.\n\n## Declaration\n\n```swift\nextern void dispatch_write(dispatch_fd_t fd, dispatch_data_t data, dispatch_queue_t queue, void (^handler)(dispatch_data_t data, int error));\n```\n\n## Parameters\n\n- **fd**: The file descriptor to use when writing the data.\n- **data**: The data to write to the file descriptor.\n- **queue**: The queue on which to execute the specified handler block.\n- **handler**: The block to schedule for execution once the specified data has been written to the file descriptor. The parameters of the handler are as follows:\n\n- `data` - The data that could not be written to the file descriptor. If the data was written successfully, this parameter is `NULL`.\n- `error` - This value is `0` if the data was written successfully. If an error occurred, this parameter contains the error number.\n\n## Discussion\n\nThis is a convenience function for initiating a single, asynchronous write operation at the current position of the specified file descriptor. This method is intended for simple operations where you do not need the overhead of creating a channel and do not plan on issuing more than a few calls to read or write data. Once submitted, there is no way to cancel the write operation.\n\nAfter calling this function, the system takes control of the specified file descriptor until the handler block is enqueued. While it controls the file descriptor, the system may modify it on behalf of the application. For example, the system typically adds the `O_NONBLOCK` flag to ensure that any operations are non-blocking. During that time, it is an error for your application to modify the file descriptor directly. However, you may pass the file descriptor to this function or the [doc:\/\/com.apple.dispatch\/documentation\/Dispatch\/dispatch_read] function. You may also use the file descriptor to create a new dispatch I\/O channel. The system relinquishes control of the file descriptor before calling your handler, so it is safe to modify the file descriptor again from your handler code.\n\nThe `handler` you provide is not queued for execution until the write operation finishes. In addition, if you issue multiple read or write calls for the same file descriptor using the convenience APIs, all of those operations must complete before any of the associated handlers are queued. If you are already using the file descriptor with another channel, you should use the [doc:\/\/com.apple.dispatch\/documentation\/Dispatch\/DispatchIO\/write(offset:data:queue:ioHandler:)] function to write data to the channel rather than use this function.\n\n## Writing to the File\n\n- **dispatch_io_write**: Schedules an asynchronous write operation for the specified channel.\n\n",
|
|
"sections" : [
|
|
{
|
|
"content" : "",
|
|
"items" : [
|
|
{
|
|
"description" : "Schedules an asynchronous write operation for the specified channel.",
|
|
"name" : "dispatch_io_write",
|
|
"url" : "https:\/\/developer.apple.com\/documentation\/Dispatch\/dispatch_io_write"
|
|
}
|
|
],
|
|
"title" : "Writing to the File"
|
|
}
|
|
],
|
|
"source" : "appleJSON",
|
|
"title" : "dispatch_write",
|
|
"url" : "https:\/\/developer.apple.com\/documentation\/dispatch\/dispatch_write"
|
|
} |