Direct IO Functions

Table of Contents

  • dio_close β€” Closes the file descriptor given by fd
  • dio_fcntl β€” Performs a c library fcntl on fd
  • dio_open β€” Opens a file (creating it if necessary) at a lower level than the C library input/output stream functions allow
  • dio_read β€” Reads bytes from a file descriptor
  • dio_seek β€” Seeks to pos on fd from whence
  • dio_stat β€” Gets stat information about the file descriptor fd
  • dio_tcsetattr β€” Sets terminal attributes and baud rate for a serial port
  • dio_truncate β€” Truncates file descriptor fd to offset bytes
  • dio_write β€” Writes data to fd with optional truncation at length
οΌ‹add a note

User Contributed Notes 2 notes

up
1
richard d_0t cubek a_t example D0_t com ΒΆ
18 years ago
IMPORTANT:

--enable-dio is NOT recognized as an option. After reporting a bug, i got following answer:

It is not bundled anymore. See http://pecl.php.net/dio to fetch the CVS version (being unmaintained, there is no release in pecl). Not a bug > bogus.
up
-4
tom at bitworks dot de ΒΆ
18 years ago
to use mandatory locking on a linux system, the filesystem has to be well prepared.

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>               <dump>  <pass>
/dev/hda1       /               ext3    errors=remount-ro,mand  0       1
/dev/hda2       none            swap    sw                      0       0
proc            /proc           proc    defaults                0       0
/dev/fd0        /floppy         auto    user,noauto             0       0
/dev/cdrom      /cdrom          iso9660 ro,user,noauto          0       0 

For example here the ext3 partition has been prepared for mandatory locking. Otherwise no dio_function will work on the system.