file.isLocked

Syntax file.isLocked (path)

Params path is a legal path name to the file or volume which you wish to determine to be locked or not.

Action Checks to see if a file is locked and, therefore, cannot be modified.

Returns True if the file is locked, false if the file is unlocked or if path designates a folder.

Examples file.isLocked ("C:\\Program Files\\Frontier\\Frontier.exe")

   » false


file.isLocked ("System:")

   » false

Disk volumes can't be locked from software.

file.isLocked ("System:System Folder:")

   » false

Folders can't be locked.

file.lock ("System:tmp");
file.isLocked ("System:tmp")

   » true

file.unlock ("System:tmp");
file.isLocked ("System:tmp")

   » false

Notes Even if a floppy disk or other similar device is locked by hardware means, file.isLocked will return false when applied to a disk volume. This is because the hardware lock is fundamentally different from a software lock.

See Also file.lock

Discuss