ldk_os_open_default
Opens a file or directory with the operating system default handler.
LDK_API bool ldk_os_open_default(const char *path);
Parameters
const char *path
- Path identifying the file or resource.
Returns
True if the operation succeeds; false otherwise.
ldk_os_process_cancel
Cancels the process and its child process tree.
LDK_API bool ldk_os_process_cancel(LDKOSProcess *process);
Parameters
LDKOSProcess *process
- Process used by this operation.
Returns
True if the operation succeeds; false otherwise.
ldk_os_process_destroy
Releases the process resources. A still-running process tree is terminated.
LDK_API void ldk_os_process_destroy(LDKOSProcess *process);
Parameters
LDKOSProcess *process
- Process used by this operation.
ldk_os_process_launch
Launches a process without waiting for it to exit and without retaining a
process handle. This is intended for opening external editor applications
rather than managed editor jobs.
On success started is true and completed is false.
LDK_API LDKOSProcessResult ldk_os_process_launch(const LDKOSProcessDesc *desc);
Parameters
const LDKOSProcessDesc *desc
- Description or configuration for this operation.
Returns
Result of the operation.
ldk_os_process_output_read
Reads currently available captured output without blocking.
stdout and stderr are merged and returned in process order as observed by
the shared pipe. The returned byte count may be zero while the process is
still running.
LDK_API size_t ldk_os_process_output_read(
LDKOSProcess *process,
char *out_buffer,
size_t buffer_size
);
Parameters
LDKOSProcess *process
- Process used by this operation.
char *out_buffer
- Destination buffer that receives the result.
size_t buffer_size
- Capacity of the buffer in bytes.
Returns
The resulting numeric value.
ldk_os_process_poll
Polls the current process state without blocking.
Returns false only when polling fails. out_result is always updated when it
is not NULL. completed becomes true after the child process exits.
LDK_API bool ldk_os_process_poll(
LDKOSProcess *process,
LDKOSProcessResult *out_result
);
Returns
True if the operation succeeds; false otherwise.
ldk_os_process_run
Run a child process using the supplied process description.
LDK_API LDKOSProcessResult ldk_os_process_run(const LDKOSProcessDesc *desc);
Parameters
const LDKOSProcessDesc *desc
- Description or configuration for this operation.
Returns
Result of the operation.
ldk_os_process_start
Starts a process and captures stdout and stderr into one output stream.
The returned process must be destroyed with ldk_os_process_destroy().
When out_result is not NULL it receives the initial process result. On
success started is true and completed is false. On failure NULL is returned
and os_error contains the platform error when available.
LDK_API LDKOSProcess * ldk_os_process_start(
const LDKOSProcessDesc *desc,
LDKOSProcessResult *out_result
);
Parameters
const LDKOSProcessDesc *desc
- Description or configuration for this operation.
LDKOSProcessResult *out_result
- Receives additional status or diagnostic information.
Returns
Pointer to the requested object or data; NULL when unavailable.
ldk_os_process_was_cancelled
Returns true when cancellation was successfully requested for the process.
LDK_API bool ldk_os_process_was_cancelled(const LDKOSProcess *process);
Parameters
const LDKOSProcess *process
- Process used by this operation.
Returns
True when the queried condition holds; false otherwise.