aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/file_io_server.erl
AgeCommit message (Collapse)Author
2015-12-02Merge branch 'soranoba/fix-file-position/PR-646' into maintRaimo Niskanen
* soranoba/fix-file-position/PR-646: Unify internal error handling Fix file:pread and :pwrite to use character encoding Clean up code for file:position/2 Fix file:position (not raw mode) OTP-13155
2015-11-26Unify internal error handlingRaimo Niskanen
2015-11-26Fix file:pread and :pwrite to use character encodingRaimo Niskanen
2015-11-24Clean up code for file:position/2Raimo Niskanen
2015-06-18Change license text to APLv2Bruce Yinhe
2015-03-14Fix file:position (not raw mode)soranoba
When it called the "file:position", it subtract the size that was read into the buffer, and returns the value. However, it has been discarded buffer and correct position is lost, if "file:postion" returns error.
2015-03-10kernel: Fix file:read_line/1 unicode error handlingDan Gudmundsson
When a file was opened with some unicode encoding, file:read_line/1 could return unicode codepoints > 255 in list mode and wrong error message in bin mode. Chose to break out 'get_line' functionality from get_chars/5 since 'get_until' handling is different (comes from io module which should return unicode lists) and seems to have its own (doc?) problems.
2013-05-06Fix unmatched_returns warnings in STDLIB and KernelHans Bolinder
2013-04-05Use erlang:demonitor(Ref, [flush]) where applicableLoïc Hoguin
2013-01-09Add file:allocate/3 operationFilipe David Manana
This operation allows pre-allocation of space for files. It succeeds only on systems that support such operation. The POSIX standard defines the optional system call posix_fallocate() to implement this feature. However, some systems implement more specific functions to accomplish the same operation. On Linux, if the more specific function fallocate() is implemented, it is used instead of posix_fallocate(), falling back to posix_fallocate() if the fallocate() call failed (it's only supported for the ext4, ocfs2, xfs and btrfs file systems at the moment). On Mac OS X it uses the specific fcntl() operation F_PREALLOCATE, falling back to posix_fallocate() if it's available (at the moment Mac OS X doesn't provide posix_fallocate()). On any other UNIX system, it uses posix_fallocate() if it's available. Any other system not providing this system call or any function to pre-allocate space for files, this operation always fails with the ENOTSUP POSIX error.
2013-01-02[stdlib, kernel] Introduce Unicode support for Erlang source filesHans Bolinder
Expect modifications, additions and corrections. There is a kludge in file_io_server and erl_scan:continuation_location() that's not so pleasing.
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-22Rename dyntrace BIFs to more suiting namesPatrik Nyblom
2012-03-22Correct some errors in the user tag spreadingPatrik Nyblom
2012-03-22Add user tag spreading functionality to VM and use in filePatrik Nyblom
User tags in a dynamic trace enabled VM are spread throughout the system in the same way as seq_trace tokens. This is used by the file module and various other modules to get hold of the tag from the user process without changing the protocol.
2012-03-22Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 4/4Scott Lystig Fritchie
Add probes to (mostly) the efile_drv.c driver and other file I/O-related source files.
2010-11-30Handle binary file names and conversion of unicode stringsPatrik Nyblom
2010-05-20Add file:advise/4 - a wrapper to the POSIX syscall posix_fadviseFilipe David Manana
Useful for informing the Operating System about the access pattern for a file's data, so that it can adapt the caching strategy to maximize disk IO performance.
2010-05-20Add file:datasync/1 for syncing file contents onlyFilipe David Manana
file:datasync/1 invokes the POSIX system call "int fdatasync(int fd)". This system call is similar to "fsync" but, unlike fsync, it does not update the metadata associated with the file (like the access time for example). It's used by many DBMSs (MySQL and SQLite of example) to increase disk IO performance, as it avoids disk seeks and disk write operations compared to fsync. More details on it at: http://linux.die.net/man/2/fdatasync An example, from the MySQL source: http://bazaar.launchpad.net/~mysql/mysql-server/mysql-5.1-telco-6.1/annotate/head%3A/mysys/my_sync.c#L61 This new function just calls fsync on systems not implementing fdatasync.
2010-04-29Merge branch 'ks/kernel' into devErlang/OTP
* ks/kernel: kernel: Clean up as suggested by tidier OTP-8606 ks/kernel
2010-04-28kernel: Clean up as suggested by tidierKostis Sagonas
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP