Skip to content

Commit e4deb4a

Browse files
committed
feat: add get_tmpfs_file_path
1 parent de5b831 commit e4deb4a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,17 @@ impl Shmem {
358358
pub fn get_os_id(&self) -> &str {
359359
self.mapping.unique_id.as_str()
360360
}
361+
362+
/// Returns the tmpfs path if present
363+
#[cfg(not(target_os = "windows"))]
364+
pub fn get_tmpfs_file_path(&self) -> Option<PathBuf> {
365+
if self.config.use_tmpfs {
366+
self.config.get_tmpfs_file_path().ok()
367+
} else {
368+
None
369+
}
370+
}
371+
361372
/// Returns the flink path if present
362373
pub fn get_flink_path(&self) -> Option<&PathBuf> {
363374
self.config.flink_path.as_ref()

0 commit comments

Comments
 (0)