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[Unlock] - release a file lock
Calling Sequence
Unlock(file, opt1, opt2, ...)
Parameters
file
-
filename or the file descriptor of a locked file
opt1, opt2, ...
(optional) arguments
Description
The Unlock(file) command releases a file lock for file. With no optional arguments, the exclusive lock for the entire file is released.
The optional arguments passed to Unlock must match those given to Lock when the lock was acquired.
If opt1, opt2, ... is bytes=low..high, then the bytes in file position low to high in file are unlocked. If relative is also specified, then low and high are considered relative to the current file position. The bytes range must match a range given to a call to Lock.
The Unlock command does not return anything. If an error occurs, an exception is raised.
For more information about file locking, see the Lock help page.
Locks on a file are released when the file is closed. As all files are closed on exit from Maple, all file locks are released when Maple exits. It is possible that these file locks will not be removed immediately when Maple exits. Therefore, if you depend on files being immediately available after Maple exits, they must be explicitly unlocked.
On UNIX systems it is not necessary that the bytes range be the range of a Lock call. All the bytes in the specified range are unlocked, assuming they are of matching type.
Examples
See Also
FileTools, FileTools[IsLockable], FileTools[Text][Open], IO_errors, iostatus
Download Help Document