Struct FsHelper

Synopsis

#include <src/uvw/fs.h>

struct FsHelper

Description

Helper functions.

Methods

handleGets the OS dependent handle.
openGets the file descriptor.

Source

Lines 1428-1452 in src/uvw/fs.h.

struct FsHelper {
    /**
     * @brief Gets the OS dependent handle.
     *
     * For a file descriptor in the C runtime, get the OS-dependent handle. On
     * UNIX, returns the file descriptor as-is. On Windows, this calls a system
     * function.<br/>
     * Note that the return value is still owned by the C runtime, any attempts
     * to close it or to use it after closing the file descriptor may lead to
     * malfunction.
     */
    static OSFileDescriptor handle(FileHandle file) noexcept;

    /**
     * @brief Gets the file descriptor.
     *
     * For a OS-dependent handle, get the file descriptor in the C runtime. On
     * UNIX, returns the file descriptor as-is. On Windows, this calls a system
     * function.<br/>
     * Note that the return value is still owned by the C runtime, any attempts
     * to close it or to use it after closing the handle may lead to
     * malfunction.
     */
    static FileHandle open(OSFileDescriptor descriptor) noexcept;
};





Add Discussion as Guest

Log in