FileControl

interface FileControl(source)

Exposes the file control APIs.

Every member requires an explicit database, null targeting the main database. See the extension properties and functions below for shorthands that target the main database.

Properties

Link copied to clipboard

Shorthand for FileControl.getDataVersion on the main database.

Link copied to clipboard

Shorthand for hasMoved on the main database.

Link copied to clipboard

Shorthand for isPersistWal and FileControl.setPersistWal on the main database.

Link copied to clipboard
Link copied to clipboard

Shorthand for FileControl.getMmapSize and FileControl.setMmapSize on the main database.

Link copied to clipboard

Shorthand for FileControl.getSizeLimit and FileControl.setSizeLimit on the main database.

Link copied to clipboard

Shorthand for FileControl.getSystemError on the main database.

Link copied to clipboard

Shorthand for FileControl.getTempFileName on the main database.

Link copied to clipboard

Shorthand for FileControl.getVfsName on the main database.

Functions

Link copied to clipboard
abstract fun getDataVersion(database: String?): Int

Returns a value for database that changes every time the database's content is modified, whether from this connection or another one, usable to detect changes made outside this connection.

Link copied to clipboard
abstract fun getMmapSize(database: String?): Long?

Returns the maximum number of bytes that will be used for memory-mapped I/O on database, or null if the option is not supported by the VFS.

Link copied to clipboard
abstract fun getSizeLimit(database: String?): Long?

Returns the upper bound on the size of the in-memory database for database, or null if the option is not supported by the VFS.

Link copied to clipboard
abstract fun getSystemError(database: String?): Int?

Returns the platform specific error code for database, or null if the option is not supported by the VFS.

Link copied to clipboard
abstract fun getTempFileName(database: String?): String?

Returns a generated temporary file name for database, or null if the option is not supported by the VFS.

Link copied to clipboard
abstract fun getVfsName(database: String?): String?

Returns the names of all VFS shims and the final bottom-level VFS for database, or null if the option is not supported by the VFS.

Link copied to clipboard
abstract fun hasMoved(database: String?): Boolean?

Returns whether the file for database has been renamed, moved, or deleted since it was first opened, or null if the option is not supported by the VFS.

Link copied to clipboard
abstract fun isPersistWal(database: String?): Boolean?

Returns whether the persistent WAL mode is enabled for database, or null if the option is not supported by the VFS.

Link copied to clipboard
abstract fun isPowerSafeOverwrite(database: String?): Boolean?

Returns whether the zero-damage mode is enabled for database, or null if the option is not supported by the VFS.

Link copied to clipboard
abstract fun reserveBytes(bytes: Int, database: String?)

Sets the number of bytes of reserved space at the end of each page of database to bytes, available to extensions such as an encryption codec for a nonce or checksum.

Link copied to clipboard

Shorthand for reserveBytes on the main database.

Link copied to clipboard
abstract fun resetCache(database: String?)

Purges the content of the in-memory page cache for database.

Link copied to clipboard

Shorthand for resetCache on the main database.

Link copied to clipboard
abstract fun setChunkSize(size: Int, database: String?)

Sets the size of a chunk the VFS should split the database file for database into. Does nothing if the VFS does not support the option.

Link copied to clipboard

Shorthand for setChunkSize on the main database.

Link copied to clipboard
abstract fun setLockTimeout(millis: Int, database: String?)

Sets the duration, in milliseconds, this connection waits to obtain a file lock on database before failing. Does nothing if the VFS does not support the option.

Link copied to clipboard

Shorthand for setLockTimeout on the main database.

Link copied to clipboard
abstract fun setMmapSize(size: Long, database: String?)

Sets the maximum number of bytes that will be used for memory-mapped I/O on database. Does nothing if the VFS does not support the option.

Link copied to clipboard
abstract fun setOverwrite(value: Long, database: String?)

Indicates that the entire database file for database will be overwritten by the current transaction. Does nothing if the VFS does not support the option.

Link copied to clipboard

Shorthand for setOverwrite on the main database.

Link copied to clipboard
abstract fun setPersistWal(enabled: Boolean, database: String?)

Enables or disables the persistent WAL mode for database. Does nothing if the VFS does not support the option.

Link copied to clipboard
abstract fun setPowerSafeOverwrite(enabled: Boolean, database: String?)

Enables or disables the zero-damage mode for database. Does nothing if the VFS does not support the option.

Link copied to clipboard
abstract fun setSizeHint(size: Long, database: String?)

Gives the VFS layer a hint of how large the database file for database will grow during the current transaction. Does nothing if the VFS does not support the option.

Link copied to clipboard

Shorthand for setSizeHint on the main database.

Link copied to clipboard
abstract fun setSizeLimit(limit: Long, database: String?)

Sets the upper bound on the size of the in-memory database for database. Does nothing if the VFS does not support the option.