1DBM::Deep::Storage::FilUes(e3r)Contributed Perl DocumentDaBtMi:o:nDeep::Storage::File(3)
2
3
4

NAME

6       DBM::Deep::Storage::File - mediate low-level interaction with storage
7       mechanism
8

PURPOSE

10       This is an internal-use-only object for DBM::Deep. It mediates the low-
11       level interaction with the storage mechanism.
12
13       Currently, the only storage mechanism supported is the file system.
14

OVERVIEW

16       This class provides an abstraction to the storage mechanism so that the
17       Engine (the only class that uses this class) doesn't have to worry
18       about that.
19

METHODS

21   new( \%args )
22   open()
23       This method opens the filehandle for the filename in " file ".
24
25       There is no return value.
26
27   close()
28       If the filehandle is opened, this will close it.
29
30       There is no return value.
31
32   size()
33       This will return the size of the DB. If file_offset is set, this will
34       take that into account.
35
36       NOTE: This function isn't used internally anywhere.
37
38   set_inode()
39       This will set the inode value of the underlying file object.
40
41       This is only needed to handle some obscure Win32 bugs. It really
42       shouldn't be needed outside this object.
43
44       There is no return value.
45
46   print_at( $offset, @data )
47       This takes an optional offset and some data to print.
48
49        $offset , if defined, will be used to seek into the file. If
50       file_offset is set, it will be used as the zero location. If it is
51       undefined, no seeking will occur. Then,  @data  will be printed to the
52       current location.
53
54       There is no return value.
55
56   read_at( $offset, $length )
57       This takes an optional offset and a length.
58
59        $offset , if defined, will be used to seek into the file. If
60       file_offset is set, it will be used as the zero location. If it is
61       undefined, no seeking will occur. Then,  $length  bytes will be read
62       from the current location.
63
64       The data read will be returned.
65
66   DESTROY
67       When the ::Storage::File object goes out of scope, it will be closed.
68
69   request_space( $size )
70       This takes a size and adds that much space to the DBM.
71
72       This returns the offset for the new location.
73
74   copy_stats( $target_filename )
75       This will take the stats for the current filehandle and apply them to
76       $target_filename . The stats copied are:
77
78       ·   Onwer UID and GID
79
80       ·   Permissions
81
82
83
84perl v5.30.1                      2020-01-29       DBM::Deep::Storage::File(3)
Impressum