Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

stat_t

Metadata about a directory entry.

Description

This structure looks somewhat like a struct stat, and indeed it was derived from BSD's struct stat. However there are a number of changes to better interoperate with modern practice, specifically:

Synopsis
struct stat_t
{
  uint64_t st_dev;                               // inode of device containing file (POSIX only) 
  uint64_t st_ino;                               // inode of file (Windows, POSIX) 
  filesystem::file_type st_type;                 // type of file (Windows, POSIX) 
  filesystem::perms st_perms;                    // uint16_t bitfield perms of file (POSIX only) 
  int16_t st_nlink;                              // number of hard links (Windows, POSIX) 
  int16_t st_uid;                                // user ID of the file (POSIX only) 
  int16_t st_gid;                                // group ID of the file (POSIX only) 
  dev_t st_rdev;                                 // id of file if special (POSIX only) 
  chrono::system_clock::time_point st_atim;      // time of last access (Windows, POSIX) 
  chrono::system_clock::time_point st_mtim;      // time of last data modification (Windows, POSIX) 
  chrono::system_clock::time_point st_ctim;      // time of last status change (Windows, POSIX) 
  off_t st_size;                                 // file size, in bytes (Windows, POSIX) 
  off_t st_allocated;                            // bytes allocated for file (Windows, POSIX) 
  off_t st_blocks;                               // number of blocks allocated (Windows, POSIX) 
  uint16_t st_blksize;                           // block size used by this device (Windows, POSIX) 
  uint32_t st_flags;                             // user defined flags for file (FreeBSD, OS X, zero otherwise) 
  uint32_t st_gen;                               // file generation number (FreeBSD, OS X, zero otherwise) 
  chrono::system_clock::time_point st_birthtim;  // time of file creation (Windows, FreeBSD, OS X, zero otherwise) 
  unsigned st_sparse;                            // if this file is sparse, or this directory capable of sparse files (Windows, POSIX) 
  unsigned st_compressed;                        // if this file is compressed, or this directory capable of compressed files (Windows) 
  unsigned st_reparse_point;                     // if this file or directory is a reparse point (Windows) 
};
Constructor(s)

Function

Description

Parameters

stat_t()

Constructs a UNINITIALIZED instance i.e. full of random garbage.

stat_t(std::nullptr_t )

Constructs a zeroed instance.

std::nullptr_t: :

Header

#include <boost/afio/v2/afio.hpp>


PrevUpHomeNext