跳转至内容

AnyLang 编程语言比较/附录:PLEAC 交叉引用:文件访问

来自 Wikibooks,开放世界中的开放书籍

FileAccess

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

打开文件

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

打开具有不寻常文件名的文件

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

扩展文件名中的波浪号

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

让 Perl 在错误中报告文件名

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

创建临时文件

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

在程序文本中存储文件

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

编写过滤器

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

使用临时文件就地修改文件

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

使用 -i 开关就地修改文件

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

无需临时文件就地修改文件

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

锁定文件

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

刷新输出

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

从多个文件句柄读取而不阻塞

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

执行非阻塞 I/O

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

确定要读取的字节数

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

在变量中存储文件句柄

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

缓存打开的输出文件句柄

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

同时打印到多个文件句柄

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

通过编号打开和关闭文件描述符

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

复制文件句柄

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

程序:netlock

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    

程序:lockarea

[编辑 | 编辑源代码]
ada c++ commonlisp cposix erlang factor forth
groovy guile haskell haskell-on-steroids java masd merd
nasm ocaml perl php pike pliant python
R rexx ruby smalltalk tcl    
华夏公益教科书