CakeFest 2024: The Official CakePHP Conference

IO Direto Funções

Índice

  • dio_close — Fecha o descritor de arquivo fornecido por fd
  • dio_fcntl — Realiza uma chamada à função fcntl da biblioteca C em fd
  • dio_open — Abre um arquivo (criando-o, se necessário) em um nível mais baixo do que as funções de entrada/saída da biblioteca C permitem
  • dio_read — Lê bytes de um descritor de arquivo
  • dio_seek — Move-se para a posição pos no descritor de arquivo (fd) a partir de whence
  • dio_stat — Obtém informações estatísticas sobre o descritor de arquivo fd
  • dio_tcsetattr — Define os atributos do terminal e a taxa de transmissão para uma porta serial
  • dio_truncate — Trunca o descritor de arquivo fd para o deslocamento em bytes
  • dio_write — Escreve dados em fd com opção de truncamento no comprimento
add a note

User Contributed Notes 3 notes

up
1
richard d_0t cubek a_t example D0_t com
16 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
16 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.
up
-6
php dot 5 dot gavinostlund at spamgourmet dot com
16 years ago
You can manually build the dio extension for your version of PHP, or install an older version of PHP that still bundled dio. It's not that hard to build it yourself, just a bit of a process, and it helps if you're on linux, and have a build environment... which I would assume you have if you are doing some kind of development that requires direct device I/O... Just get the dio source from the cvs repo, compile it, and then add the extension to your php configuration...
To Top