*
  • "start" - offset where lock begins
  • *
  • "length" - size of locked area. zero means to end of file
  • *
  • "whence" - Where l_start is relative to: can be SEEK_SET, SEEK_END and SEEK_CUR
  • *
  • "type" - type of lock: can be F_RDLCK (read lock), F_WRLCK (write lock) or F_UNLCK (unlock)
  • * * @return mixed Returns the result of the C call. */ function dio_fcntl($fd, int $cmd, ...$args) {} /** * Opens a file (creating it if necessary) at a lower level than theC library input/ouput stream functions allow * * dio_open ( string $filename , int $flags [, int $mode = 0 ] ) : resource * * @link https://www.php.net/manual/en/function.dio-open.php * @param string $filename The pathname of the file to open. * @param int $flags The flags parameter is a bitwise-ORed value comprising flags from the following list. * * @param int $mode If flags contains O_CREAT, mode will set the permissions of the file (creation permissions). * @return resource|false A file descriptor or FALSE on error. */ function dio_open(string $filename, int $flags, int $mode = 0) {} /** * Reads bytes from a file descriptor. * * dio_read ( resource $fd [, int $len = 1024 ] ) : string * * @param resource $fd The file descriptor returned by dio_open(). * @param int $len The number of bytes to read. If not specified, dio_read() reads 1k sized block. * @return string The bytes read from fd. * @link https://www.php.net/manual/en/function.dio-read.php */ function dio_read($fd, int $len = 1024) {} /** * Seeks to pos on fd from whence * * dio_seek ( resource $fd , int $pos [, int $whence = SEEK_SET ] ): int * * @param resource $fd The file descriptor returned by dio_open(). * @param int $pos The new position. * @param int $whence Specifies how the position pos should be interpreted: * * @return int * @link https://www.php.net/manual/en/function.dio-seek.php */ function dio_seek($fd, int $pos, int $whence = SEEK_SET) {} /** * Gets stat information about the file descriptor fd * * dio_stat ( resource $fd ) : array * * @param resource $fd The file descriptor returned by dio_open(). * @return array|null Returns an associative array with the following keys: * * On error dio_stat() returns NULL. * @link https://www.php.net/manual/en/function.dio-stat.php */ function dio_stat($fd) {} /** * Sets terminal attributes and baud rate for a serial port * * dio_tcsetattr ( resource $fd , array $options ) : bool * * @param resource $fd The file descriptor returned by dio_open(). * @param array $options The currently available options are: * * @return void * @link https://www.php.net/manual/en/function.dio-tcsetattr.php */ function dio_tcsetattr($fd, array $options) {} /** * Truncates a file to at most offset bytes in size. * * dio_truncate ( resource $fd , int $offset ) : bool * * If the file previously was larger than this size, the extra data is lost. * If the file previously was shorter, it is unspecified whether the file is left unchanged or is extended. * In the latter case the extended part reads as zero bytes. * @param resource $fd The file descriptor returned by dio_open(). * @param int $offset The offset in bytes. * @return bool Returns TRUE on success or FALSE on failure. * @link https://www.php.net/manual/en/function.dio-truncate.php */ function dio_truncate($fd, int $offset) {} /** * Writes data to fd with optional truncation at length * * dio_write ( resource $fd , string $data [, int $len = 0 ] ) : int * * @link https://www.php.net/manual/en/function.dio-write.php * @param resource $fd The file descriptor returned by dio_open(). * @param string $data The written data. * @param int $len The length of data to write in bytes. If not specified, the function writes all the data to the specified file. * @return int Returns the number of bytes written to fd. */ function dio_write($fd, string $data, int $len = 0) {} /** * Opens a raw direct IO stream. * * dio_raw ( string filename , string mode [, array options] ) : ?resource * * @param string $filename The pathname of the file to open. * @param string $mode The mode parameter specifies the type of access you require to the stream (as fopen()). * @param array|null $options The currently available options are: * * @return resource|null A stream resource or null on error. */ function dio_raw(string $filename, string $mode, ?array $options) {} /** * Opens a serial direct IO stream. * * dio_serial ( string $filename , string $mode [, array $options = null] ) : ?resource * * @param string $filename The pathname of the file to open. * @param string $mode The mode parameter specifies the type of access you require to the stream (as fopen()). * @param array|null $options The currently available options are: * * @return resource|null A stream resource or null on error. */ function dio_serial(string $filename, string $mode, ?array $options) {}