( file_io )

凡例
対応コードあり
直接対応していないが代替の書き方あり
対応コードなし
-未確認
( .. )ローカライズまだ
Example Python
pytest
PHP
PHPUnit
Swift
Testing
Csharp
xunit
Bash
bats
Powershell
pester
C++
GoogleTest
JavaScript
Jest
Kotlin
jUnit
( write_file ) f.write() file_put_contents($filename, $text) - - - - ofstream ofs(file); ofs << text; - -
( read_file_as_text ) f.read() file_get_contents($fname) - - - - - - -
( read_file_as_array ) f.readlines() file($fname, FILE_IGNORE_NEW_LINES) - - - - - - -
( read_file_line_one_by_one ) f.read() while (($line = fgets($fp)) !== false) - - - - - - -
( file_compare ) filecmp.cmp(a, b) - - - - - - - -
( example_file_line_count ) sum(1 for _ in f) sum(1 for _ in f) - - - - - - -
( file_io_with_gzip ) gzip.open(), f.write(), f.read() gzopen(), gzwrite(), gzread() - - - - - - -