.\" This man page is automatically generated using .\" kayadoc2man from the Kaya development tools and the -xmldocs compile .\" option. Editing it directly is not encouraged. .\" It is under the same license as the source .k file that it was .\" generated from. .TH "IO.open" "3kaya" "August 2014" "Kaya" "Kaya module reference" .SH "NAME" IO::open \- Open a file. .SH "SYNOPSIS" .B File open( \fIString fname, [FileMode] mode\fP .B ")" .SH "ARGUMENTS" .PP .B "fname" The name of the file .PP .B "mode" A list of file modes .SH "DESCRIPTION" .PP Open the named file with the specified file modes. Not all combinations of modes are legal, and an .B "IO.InvalidMode"(3kaya) Exception will be thrown if an illegal mode is selected. A .B "IO.FileError"(3kaya) Exception will be thrown if opening fails for any other reason. Legal mode combinations are: .IP "" -2 - \fB[Read,Write] \fP : read and write to any point in the file .IP "" -2 - \fB[Read,Append] \fP : read from any point in the file, write to the end only (creating the file if it does not exist) .IP "" -2 - \fB[Read] \fP : read from any point in the file .IP "" -2 - \fB[Write] \fP : write to any point in the file, creating the file if it does not exist, and truncating it otherwise. .IP "" -2 - \fB[Append] \fP : write to the end of the file, creating the file if it doesn't exist. .PP \fBBinary \fP can be added to any of the combinations above to open the file in binary mode on Windows (it has no effect on POSIX platforms). .SH "AUTHORS" Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ .SH LICENSE The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. .SH "RELATED" .PD 0 .PP .B "IO.close"(3kaya) .PP .B "IO.reopen"(3kaya) .PD 0.4v