add documentation for storage_size() method (#7416)
This commit is contained in:
parent
7f6fc74c36
commit
601d7a52e9
|
@ -1493,6 +1493,8 @@ impl Blocktree {
|
|||
self.last_root()
|
||||
}
|
||||
|
||||
// return the approximate size in bytes of the storage directory, or `None` if an error occurs
|
||||
// while reading the directory (directory not found, file deleted, etc)
|
||||
pub fn storage_size(&self) -> Option<u64> {
|
||||
self.db.storage_size()
|
||||
}
|
||||
|
|
|
@ -580,6 +580,8 @@ impl Database {
|
|||
self.backend.write(batch.write_batch)
|
||||
}
|
||||
|
||||
// return the approximate size in bytes of the storage directory, or `None` if an error occurs
|
||||
// while reading the directory (directory not found, file deleted, etc)
|
||||
pub fn storage_size(&self) -> Option<u64> {
|
||||
get_size(&self.path).ok()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue