Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
FileTools[IsLockable] - check to see if a file lock is obtainable
Calling Sequence
IsLockable(file, opt1, opt2, ...)
Parameters
file
-
filename or the file descriptor of an open file
opt1, opt2, ...
(optional) arguments
Description
The IsLockable(file) command checks if it is currently possible to obtain a file lock for file. With no optional arguments, an exclusive lock for the entire file is tested.
The IsLockable function returns true if the lock can be obtained and false otherwise. If an error occurs, an exception is raised.
If opt1, opt2, ... is bytes=low..high, then the bytes in file position low to high in file are locked. If relative is also specified then low and high are considered relative to the current file position. It is possible to lock regions beyond the end of the file using the bytes argument.
Some implementations of IsLockable will temporarily obtain the file lock. Therefore, during a call to IsLockable other processes may see the file as locked.
Using IsLockable to determine when Lock must be called is not safe. It is possible for another process to acquire a lock on the file between the call to IsLockable and Lock. Instead, Lock must be called and the false return handled appropriately.
For more information about Maple file locking capabilities, see the Lock help page.
IsLockable supports the type=shared argument on those operating systems that support it. The block argument is not a valid argument to IsLockable.
Examples
See Also
FileTools, FileTools[Lock], FileTools[Text][Open], FileTools[Unlock], IO_errors, iostatus
Download Help Document