MCPcopy Create free account
hub / github.com/catboost/catboost / TFileStat

Class TFileStat

util/system/fstat.h:10–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8struct stat;
9
10struct TFileStat {
11 ui32 Mode = 0; /* protection */
12 ui32 Uid = 0; /* user ID of owner */
13 ui32 Gid = 0; /* group ID of owner */
14
15 ui64 NLinks = 0; /* number of hard links */
16 ui64 Size = 0; /* total size, in bytes */
17 ui64 INode = 0; /* inode number */
18 ui64 AllocationSize = 0; /* number of bytes allocated on the disk */
19
20 time_t ATime = 0; /* time of last access */
21 long ATimeNSec = 0; /* nsec of last access */
22 time_t MTime = 0; /* time of last modification */
23 long MTimeNSec = 0; /* nsec of last modification */
24 time_t CTime = 0; /* time of last status change */
25 long CTimeNSec = 0; /* nsec of last status change */
26
27 TFileStat();
28
29 bool IsNull() const noexcept;
30
31 bool IsFile() const noexcept;
32 bool IsDir() const noexcept;
33 bool IsSymlink() const noexcept;
34
35#if defined(_unix_)
36 explicit TFileStat(const struct stat& fs);
37#endif
38 explicit TFileStat(const TFile& f);
39 explicit TFileStat(FHANDLE f);
40 TFileStat(const TFsPath& fileName, bool nofollow = false);
41 TFileStat(const TString& fileName, bool nofollow = false);
42 TFileStat(const char* fileName, bool nofollow = false);
43
44 bool operator==(const TFileStat& other) const noexcept;
45
46private:
47 void MakeFromFileName(const char* fileName, bool nofollow);
48};
49
50i64 GetFileLength(FHANDLE fd);
51i64 GetFileLength(const char* name);

Callers 15

Y_UNIT_TESTFunction · 0.85
TImplMethod · 0.85
ReopenLogMethod · 0.85
TestCreateRemoveMethod · 0.85
RemoveRecursiveMethod · 0.85
Y_UNIT_TESTFunction · 0.85
fstat.cppFile · 0.85
TFileStatMethod · 0.85
MakeFromFileNameMethod · 0.85
IsNullMethod · 0.85
Y_UNIT_TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCreateRemoveMethod · 0.68