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
iostatus - indicate status of all open files
Description
The iostatus function takes no arguments, and returns a list of at least three elements.
The number of files open by the I/O library
The number of currently active nested "read" commands
The upper bound on iostatus()[1] + iostatus()[2]
For each open file, an additional element appears in the list. Each element is itself a list, whose elements are:
The file descriptor (from fopen, open, pipe, or popen)
The name of the file, pipe, or process
The file type (STREAM, RAW, PIPE, PROCESS, or DIRECT)
FP=address for a STREAM or PROCESS, FD=num otherwise
The file mode (READ or WRITE)
The file type (TEXT or BINARY)
Element 2, the name, contains the actual file name for a STREAM or RAW file, "pipe:n" where "n" is the actual file descriptor for a PIPE file, the process name (ie. the command) for a PROCESS file, and "default" or "terminal" for a DIRECT file.
Element 4 gives the internal representation of the file, either a file pointer (FILE *) or file descriptor (int). This is useful when opening a pipe, because whatever you connect the other end of the pipe to needs to know the actual file descriptor, not the Maple file descriptor.
Thread Safety
The iostatus command is thread safe as of Maple 15.
iostatus returns the status of the i/o system at the moment at which iostatus is executed. However events occurring in parallel threads can effect the status as soon as iostatus has returned.
For more information on thread safety, see index/threadsafe.
Examples
See Also
feof, file_types, filepos
Download Help Document