Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

PStore#open_and_lock_file

open_and_lock_file(filename, read_only)

Open the specified filename (either in read-only mode or in read-write mode) and lock it for reading or writing.

The opened File object will be returned. If read_only is true, and the file does not exist, then nil will be returned.

All exceptions are propagated.

See also #on_windows? #path #load_data #root? also in 3.4 · 3.3 · 3.1 · 3.0