- infos = Information about the file plugin is in keys below
- infos/author = Thomas Waser thomas.waser@libelektra.org
- infos/licence = BSD
- infos/needs =
- infos/provides = storage/file
- infos/recommends =
- infos/placements = getstorage setstorage
- infos/status = maintained conformant compatible coverage specific unittest tested nodep libc configurable preview experimental difficult old concept
- infos/metadata =
- infos/description = reads complete file into a key
The file plugin reads the content of a file and stores it into the parent key.
-
binary
treats the file as a binary file instead of a text file
-
info
adds additional informations about the file as metadata to the parent key.
info/size
filesizeinfo/ctime
time of last status changeinfo/atime
time of last accessinfo/mtime
time of last modificationinfo/uid
user ID of ownerinfo/gid
group ID of ownerinfo/mode
protectioninfo/inode
inode number
kdb mount file /testfile file
None.
# Mount the file `file/multiline` at `system/tests/file`
sudo kdb mount "$PWD/src/plugins/file/file/singleline" system/tests/file file info=
# Check the content of the file
kdb get system/tests/file
#> this is a single line testfile
# List available attributes of the mounted file
kdb lsmeta system/tests/file
#> info/atime
#> info/ctime
#> info/gid
#> info/inode
#> info/mode
#> info/mtime
#> info/size
#> info/uid
# Check out the file’s permissions
kdb getmeta system/tests/file info/mode
# STDOUT-REGEX: 1006[46]4
# Unmount the file
sudo kdb umount system/tests/file
None.