Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
FileTools[Text][Open] - open a file for buffered reading or writing
Calling Sequence
Open(name, opt1, opt2, ...)
Parameters
name
-
name of the file to be opened
opt1, opt2, ...
(optional) argument of the form where option is one of create, overwrite, or append
Description
The Open(name) command opens a file for reading and writing of text data.
There are three optional arguments: create, overwrite, and append. Each accept a boolean value.
create = true or false
The create optional argument determines the behavior when file does not exist. If create is true, then file is created. If create is false, an error is raised. If file does exist, this argument has no effect. By default, create is true.
overwrite = true or false
The overwrite optional argument determines the behavior when file does exist. If overwrite is true, then the file is overwritten. If overwrite is false, the contents of the previous file are visible. If file does not exist, this argument has no effect. By default, overwrite is false.
append = true or false
The append optional argument determines the initial file position after file has been opened. If append is true, then the initial file position is at the end of the file; otherwise, it is at the beginning of the file. If file is created or overwrites a previous value, this argument has no effect. By default, append is false.
In many cases, it is not necessary to Open a file in order to access it. The first operation performed on a file opens it. The Open function allows you to control the opening mode.
If the file being opened is already open, Open raises an error.
If the limit for the maximum number of simultaneously open files has been reached, Open raises an error.
For information on filenames, see file.
Examples
See Also
file, file_types, FileTools[Text], FileTools[Text][Close], FileTools[Text][WriteString], IO_errors
Download Help Document