new
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
new(p1, p2 = v2, p3 = v3)
public
Creates a new GDBM instance by opening a gdbm file named filename. If the file does not exist, a new file with file mode mode will be created. flags may be one of the following:
-
READER - open as a reader
-
WRITER - open as a writer
-
WRCREAT - open as a writer; if the database does not exist, create a new one
-
NEWDB - open as a writer; overwrite any existing databases
The values WRITER, WRCREAT and NEWDB may be combined with the following values by bitwise or:
-
SYNC - cause all database operations to be synchronized to the disk
-
NOLOCK - do not lock the database file
If no flags are specified, the GDBM object will try to open the database file as a writer and will create it if it does not already exist (cf. flag WRCREAT). If this fails (for instance, if another process has already opened the database as a reader), it will try to open the database file as a reader (cf. flag READER).