From d344a682170e42ef3ca4e37b397428f9ba5fdb11 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Aug 2024 10:39:29 -0700 Subject: Added getLocation() support to Bu::File. It returns "file:" which could be made better eventually, but it's nice, I like the format, it'll be good for memory buffers to be able to report in a similar way. --- src/stable/file.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/stable/file.cpp') diff --git a/src/stable/file.cpp b/src/stable/file.cpp index 3487068..05e4af1 100644 --- a/src/stable/file.cpp +++ b/src/stable/file.cpp @@ -34,6 +34,7 @@ Bu::File::File( const Bu::String &sName, int iFlags ) : strerror(errno), sName.getStr() ); } bEos = false; + sLocation = "file:" + sName.clone(); } Bu::File::File( int fd ) : @@ -274,7 +275,7 @@ Bu::size Bu::File::getBlockSize() const Bu::String Bu::File::getLocation() const { - return "to be implemented"; + return sLocation.clone(); } void Bu::File::stat( struct ::stat *pStat ) -- cgit v1.2.3