From 21a67b797e40df930b83bd407ffc165b3f4b91b2 Mon Sep 17 00:00:00 2001 From: Filipe David Manana Date: Mon, 26 Apr 2010 13:04:40 +0200 Subject: Add file:advise/4 - a wrapper to the POSIX syscall posix_fadvise 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. --- lib/kernel/doc/src/file.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/kernel/doc') diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index c94df62d1f..382262d1ee 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -61,6 +61,25 @@ time() = {{Year, Month, Day}, {Hour, Minute, Second}} Must denote a valid date and time + + advise(IoDevice, Offset, Length, Advise) -> ok | {error, Reason} + Predeclare an access pattern for file data + + IoDevice = io_device() + Offset = int() + Length = int() + Advise = posix_file_advise() + posix_file_advise() = normal | sequential | random | no_reuse + | will_need | dont_need + Reason = ext_posix() + + +

advise/4 can be used to announce an intention to access file + data in a specific pattern in the future, thus allowing the + operating system to perform appropriate optimizations.

+

On some platforms, this function might have no effect.

+
+
change_group(Filename, Gid) -> ok | {error, Reason} Change group of a file -- cgit v1.2.3