8#ifndef INCLUDED_BDLS_FILESYSTEMUTIL_TRANSITIONALUNIXIMPUTIL
9#define INCLUDED_BDLS_FILESYSTEMUTIL_TRANSITIONALUNIXIMPUTIL
80#include <bdlt_datetime.h>
140template <
class UNIX_INTERFACE>
151 typedef typename UNIX_INTERFACE::off64_t
Offset;
159 typedef typename UNIX_INTERFACE::off64_t off64_t;
163 typedef typename UNIX_INTERFACE::stat64 stat64;
168 typedef typename UNIX_INTERFACE::time_t time_t;
174 static long get_st_mtim_nsec(
const stat64& stat);
177 static time_t get_st_mtime(
const stat64& stat);
183 static off64_t get_st_size(
const stat64& stat);
188 static int fstat64(
int fildes, stat64 *buf);
214template <
class UNIX_INTERFACE>
219 return UNIX_INTERFACE::get_st_mtim_nsec(stat);
222template <
class UNIX_INTERFACE>
223typename UNIX_INTERFACE::time_t
224FilesystemUtil_TransitionalUnixImpUtil<UNIX_INTERFACE>::get_st_mtime(
227 return UNIX_INTERFACE::get_st_mtime(stat);
230template <
class UNIX_INTERFACE>
231typename UNIX_INTERFACE::off64_t
232FilesystemUtil_TransitionalUnixImpUtil<UNIX_INTERFACE>::get_st_size(
235 return UNIX_INTERFACE::get_st_size(stat);
238template <
class UNIX_INTERFACE>
239int FilesystemUtil_TransitionalUnixImpUtil<UNIX_INTERFACE>::fstat64(
243 return UNIX_INTERFACE::fstat64(fildes, buf);
247template <
class UNIX_INTERFACE>
253 const int rc = fstat64(descriptor, &statResult);
258 return get_st_size(statResult);
261template <
class UNIX_INTERFACE>
267 int rc = fstat64(descriptor, &statResult);
278 long nanoseconds = get_st_mtim_nsec(statResult);
Definition bdlt_datetime.h:331
int addMicrosecondsIfValid(bsls::Types::Int64 microseconds)
Definition bdlt_datetime.h:2103
int addSecondsIfValid(bsls::Types::Int64 seconds)
Definition bdlt_datetime.h:2040
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdls_fdstreambuf.h:412
Definition bdls_filesystemutil_transitionaluniximputil.h:141
int FileDescriptor
Definition bdls_filesystemutil_transitionaluniximputil.h:147
static Offset getFileSize(FileDescriptor descriptor)
Definition bdls_filesystemutil_transitionaluniximputil.h:249
UNIX_INTERFACE::off64_t Offset
Definition bdls_filesystemutil_transitionaluniximputil.h:151
static int getLastModificationTime(bdlt::Datetime *time, FileDescriptor descriptor)
Definition bdls_filesystemutil_transitionaluniximputil.h:263
static const Datetime & epoch()
Definition bdlt_epochutil.h:375
static const bsls::Types::Int64 k_NANOSECONDS_PER_SECOND
Definition bdlt_timeunitratio.h:217
static const int k_NANOSECONDS_PER_MICROSECOND_32
Definition bdlt_timeunitratio.h:296