[#BloombergLP-bdls-FilesystemUtil_TransitionalUnixImpUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::FilesystemUtil&lowbar;TransitionalUnixImpUtil
:relfileprefix: ../../
:mrdocs:

Namespace for `FilesystemUtil` transitional&hyphen;Unix implementation details&period;

== Synopsis

Declared in `&lt;bdls&lowbar;filesystemutil&lowbar;transitionaluniximputil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class UNIX&lowbar;INTERFACE&gt;
struct FilesystemUtil&lowbar;TransitionalUnixImpUtil;
----

== Description

This component&hyphen;private utility `struct` provides a namespace for a suite of functions that `FilesystemUtil` uses as implementation details&period; These functions have a `UNIX&lowbar;INTERFACE` template parameter, which provides access to the entities that transitional&hyphen;compilation environment Unix systems declare, and that the function implementations need&period;

Note that, on some Unix platforms and some build configurations, the `stat` struct does not have an `st&lowbar;mtime` field, and `st&lowbar;mtime` is a macro that emulates the access of the field&period; Similarly, on some Unix platforms and some build configurations, the `stat` structure does not have an `st&lowbar;mtim` field or the `st&lowbar;mtim` struct does not have a `tv&lowbar;nsec` (or, for some versions of Solaris, `&lowbar;&lowbar;tv&lowbar;nsec`) field, in which case the `get&lowbar;st&lowbar;mtim&lowbar;nsec` function returns zero&period; For more information, please see the specification of the `sys&sol;stat&period;h` header from IEEE Std 1003&period;1&hyphen;2017, which provides information about the evolution of the `stat` struct in the POSIX specification (https&colon;&sol;&sol;pubs&period;opengroup&period;org&sol;onlinepubs&sol;9699919799&period;2018edition&sol;)&period;

The program is ill&hyphen;formed unless the specified `UNIX&lowbar;INTERFACE` is a class type that meets the following requirements&colon;

&ast; `UNIX&lowbar;INTERFACE&colon;&colon;off64&lowbar;t` is a type alias to the `off64&lowbar;t` type provided by the `sys&sol;types&period;h` header&period; &ast; `UNIX&lowbar;INTERFACE&colon;&colon;stat64` is a type alias to the `stat64` type provided by the `sys&sol;stat&period;h` header&period; &ast; `UNIX&lowbar;INTERFACE&colon;&colon;time&lowbar;t` is a type alias to the `time&lowbar;t` type provided by the `sys&sol;types&period;h` header&period; &ast; `UNIX&lowbar;INTERFACE&colon;&colon;get&lowbar;st&lowbar;mtim&lowbar;nsec` is a public, static member function that has `long (const stat&amp; stat)` type and whose contract is to return the value of the `st&lowbar;mtim&period;tv&lowbar;nsec` field of the specified `stat` struct&period; &ast; `UNIX&lowbar;INTERFACE&colon;&colon;get&lowbar;st&lowbar;mtime` is a public, static member function that has `time&lowbar;t (const stat&amp; stat)` type and whose contract is to return the value of the `st&lowbar;mtime` field of the specified `stat` struct&period; &ast; `UNIX&lowbar;INTERFACE&colon;&colon;get&lowbar;st&lowbar;size` is a public, static member function that has `off64&lowbar;t (const stat&amp; stat)` type and whose contract is to return the value of the `st&lowbar;size` field of the specified `stat` struct&period; Note that this function is required in order to access the data members of a `stat` struct in a manner consistent with the requirements of `get&lowbar;st&lowbar;mtime`&period; &ast; `UNIX&lowbar;INTERFACE&colon;&colon;fstat64` is a public, static member function that has `int (int fildes, stat64 &ast;buf)` type and whose contract is to return the result of `&colon;&colon;fstat64(fildes, buf)`, where `&colon;&colon;fstat64` is the function provided by the `sys&sol;stat&period;h` header&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdls/FilesystemUtil_TransitionalUnixImpUtil/FileDescriptor.adoc[`FileDescriptor`] 
| `FileDescriptor` is an alias for the operating system&apos;s native file descriptor &sol; file handle type&period;
| xref:BloombergLP/bdls/FilesystemUtil_TransitionalUnixImpUtil/Offset.adoc[`Offset`] 
| `Offset` is an alias for a signed integral type, and represents the offset of a location in a file&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdls/FilesystemUtil_TransitionalUnixImpUtil/getFileSize.adoc[`getFileSize`] 
| Return the size, in bytes, of the file with the specified `descriptor`&period;
| xref:BloombergLP/bdls/FilesystemUtil_TransitionalUnixImpUtil/getLastModificationTime.adoc[`getLastModificationTime`] 
| Load the file&apos;s last modification time into `time`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
