aboutsummaryrefslogtreecommitdiff
path: root/libbutl/fdstream.mxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-03-18 15:53:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-03-18 15:53:49 +0200
commite283b08481cfec9aa55b3ddbf369d632c7aa7b0f (patch)
tree3186eb9775f0cbd00fdc6436a05e4b73546652e5 /libbutl/fdstream.mxx
parent4e2024e2e6b8309f2db6548e04e920f565a84b0b (diff)
Add fdstat()fdstat
Diffstat (limited to 'libbutl/fdstream.mxx')
-rw-r--r--libbutl/fdstream.mxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/libbutl/fdstream.mxx b/libbutl/fdstream.mxx
index c863d2c..9818732 100644
--- a/libbutl/fdstream.mxx
+++ b/libbutl/fdstream.mxx
@@ -30,7 +30,7 @@ import std.core;
import std.io;
#endif
import butl.path;
-import butl.filesystem; // permissions
+import butl.filesystem; // permissions, entry_stat
import butl.small_vector;
#else
#include <libbutl/path.mxx>
@@ -862,9 +862,17 @@ LIBBUTL_MODEXPORT namespace butl
LIBBUTL_SYMEXPORT void
fdtruncate (int, std::uint64_t);
- // Test whether a file descriptor refers to a terminal. Throw ios::failure on
+ // Return filesystem entry stat from file descriptor. Throw ios::failure on
// the underlying OS error.
//
+ // See also path_entry() in filesystem.
+ //
+ LIBBUTL_SYMEXPORT entry_stat
+ fdstat (int);
+
+ // Test whether a file descriptor refers to a terminal. Throw ios::failure
+ // on the underlying OS error.
+ //
LIBBUTL_SYMEXPORT bool
fdterm (int);