BBjFileInfo::lock

Description

In BBj 6.0 and higher, this method locks the file channel associated with a BBjFileInfo object.

Syntax

Return Value

Method

void

lock()

Parameters

None.

Return Value

None.

Remarks

This method is equivalent to LOCK Verb - Lock File.

Example

rem ' Lock and unlock a file using BBjFileInfo methods

filename$ = "Sample.dat"
erase filename$,err=*next
mkeyed filename$,[1:1:6]+[2:1:3],[3:1:2],0,64
channel = unt
open (channel)filename$
BBjFileInfo! = BBjAPI().getFileSystem().getFileInfo(channel)
BBjFileInfo!.lock()
BBjFileInfo!.unlock()
end

See Also

BBjAPI

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.