From 21a4337dc2f969dc3ec81e6ba3170119bcb67016 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 22 Jul 2014 16:39:01 +0000 Subject: Deferred erase now works on cache entries. You can erase a cache entry while it still has active references, and it will be safely cleaned up when the last reference is released. --- src/stable/file.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/stable/file.cpp') diff --git a/src/stable/file.cpp b/src/stable/file.cpp index b551d24..35933f1 100644 --- a/src/stable/file.cpp +++ b/src/stable/file.cpp @@ -240,7 +240,7 @@ void Bu::File::setSize( Bu::size iSize ) Bu::size Bu::File::getSize() const { - struct stat st; + struct ::stat st; fstat( fd, &st ); return st.st_size; } @@ -250,7 +250,7 @@ Bu::size Bu::File::getBlockSize() const #ifdef WIN32 return 4096; #else - struct stat st; + struct ::stat st; fstat( fd, &st ); return st.st_blksize; #endif @@ -261,6 +261,11 @@ Bu::String Bu::File::getLocation() const return "to be implemented"; } +void Bu::File::stat( struct ::stat *pStat ) +{ + fstat( fd, pStat ); +} + #ifndef WIN32 void Bu::File::chmod( mode_t t ) { -- cgit v1.2.3