Welcome to mirror list, hosted at ThFree Co, Russian Federation.

struct_stat_t.qbk « generated « doc « attic - github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 32d3e4d52620dc7f0db6edcfda7b3b59184bc8ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[/============================================================================
  Boost.AFIO

  Use, modification and distribution is subject to the Boost Software License,
  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]


[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
[/ Generated from doxy/doxygen_output/xml\structboost_1_1afio_1_1stat__t.xml]
[section:stat_t stat_t]
'''<?dbhtml-include href="disqus_identifiers/stat_t.html"?>'''

'''<indexterm><primary>stat_t</primary></indexterm>'''
Metadata about a directory entry. 

[heading 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:

* inode value containers are forced to 64 bits.
* Timestamps use C++11's [^`std::chrono::system_clock::time_point`] or Boost equivalent. The resolution of these may or may not equal what a [^`struct timespec`] can do depending on your STL.
* The type of a file, which is available on Windows and on POSIX without needing an additional syscall, is provided by [^`st_type`] which is one of the values from [^`filesystem::file_type`].
* As type is now separate from permissions, there is no longer a [^`st_mode`], instead being a [^`st_perms`] which is solely the permissions bits. If you want to test permission bits in [^`st_perms`] but don't want to include platform specific headers, note that [^`filesystem::perms`] contains definitions of the POSIX permissions flags.
* The st\u005fsparse and st\u005fcompressed flags indicate if your file is sparse and/or compressed, or if the directory will compress newly created files by default. Note that on POSIX, a file is sparse if and only if st\u005fallocated < st\u005fsize which can include compressed files if that filing system is mounted with compression enabled (e.g. ZFS with ZLE compression which elides runs of zeros).
* The st\u005freparse\u005fpoint is a Windows only flag and is never set on POSIX, even on a NTFS volume. 



[heading 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) 
};
``

[heading Constructor(s)]
[table
[[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]: [']:  



]]
]

[heading Header]
`#include <boost/afio/v2/afio.hpp>`

'''<?dbhtml-include href="disqus_comments.html"?>'''
[endsect]