Time of file creation.
+ On Solaris and derivatives, the following attributes may also be
+ available:
+
+ .. attribute:: st_fstype
+
+ String that uniquely identifies the type of the filesystem that
+ contains the file.
+
On Mac OS systems, the following attributes may also be available:
.. attribute:: st_rsize
.. versionadded:: 3.5
Added the :attr:`st_file_attributes` member on Windows.
+ .. versionadded:: 3.7
+ Added the :attr:`st_fstype` member to Solaris/derivatives.
.. function:: statvfs(path)
#define MODNAME "posix"
#endif
+#if defined(__sun)
+/* Something to implement in autoconf, not present in autoconf 2.69 */
+#define HAVE_STRUCT_STAT_ST_FSTYPE 1
+#endif
#ifdef HAVE_FORK
static void
#endif
#ifdef HAVE_STRUCT_STAT_ST_FILE_ATTRIBUTES
{"st_file_attributes", "Windows file attribute bits"},
+#endif
+#ifdef HAVE_STRUCT_STAT_ST_FSTYPE
+ {"st_fstype", "Type of filesystem"},
#endif
{0}
};
#define ST_FILE_ATTRIBUTES_IDX ST_BIRTHTIME_IDX
#endif
+#ifdef HAVE_STRUCT_STAT_ST_FSTYPE
+#define ST_FSTYPE_IDX (ST_FILE_ATTRIBUTES_IDX+1)
+#else
+#define ST_FSTYPE_IDX ST_FILE_ATTRIBUTES_IDX
+#endif
+
static PyStructSequence_Desc stat_result_desc = {
"stat_result", /* name */
stat_result__doc__, /* doc */
PyStructSequence_SET_ITEM(v, ST_FILE_ATTRIBUTES_IDX,
PyLong_FromUnsignedLong(st->st_file_attributes));
#endif
+#ifdef HAVE_STRUCT_STAT_ST_FSTYPE
+ PyStructSequence_SET_ITEM(v, ST_FSTYPE_IDX,
+ PyUnicode_FromString(st->st_fstype));
+#endif
if (PyErr_Occurred()) {
Py_DECREF(v);