/usr/include/fox-1.6/FXStat.h is in libfox-1.6-dev 1.6.53-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | /********************************************************************************
* *
* F i l e S t a t i s t i c s *
* *
*********************************************************************************
* Copyright (C) 2005,2006 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXStat.h,v 1.24 2006/01/22 17:58:10 fox Exp $ *
********************************************************************************/
#ifndef FXSTAT_H
#define FXSTAT_H
namespace FX {
class FXFile;
/// Statistics about a file or directory
class FXAPI FXStat {
friend class FXFile;
private:
FXuint modeFlags; /// Mode bits
FXuint userNumber; /// User number
FXuint groupNumber; /// Group number
FXTime createTime; /// Create time
FXTime accessTime; /// Access time
FXTime modifyTime; /// Modify time
FXlong fileSize; /// File size
public:
/// Get statistics of the file into the stat buffer info
static bool statFile(const FXString& file,FXStat& info);
/// Get statistice of the link into the stat buffer info
static bool statLink(const FXString& file,FXStat& info);
/// Get statistics of already open file into stat buffer info
static bool stat(const FXFile& file,FXStat& info);
/// Return the mode flags for this file
FXuint mode() const { return modeFlags; }
/// Return file size in bytes
FXlong size() const { return fileSize; }
/// Return user number
FXuint user() const { return userNumber; }
/// Return group number
FXuint group() const { return groupNumber; }
/// Return time when last modified
FXTime modified() const { return modifyTime; }
/// Return time when last accessed
FXTime accessed() const { return accessTime; }
/// Return time when file was created
FXTime created() const { return createTime; }
/// Return time anything was changed
FXTime touched() const;
/// Return true if it is a hidden file (Windows-only)
bool isHidden() const;
/// Return true if it is a regular file
bool isFile() const;
/// Return true if it is a link
bool isLink() const;
/// Return true if character device
bool isCharacter() const;
/// Return true if block device
bool isBlock() const;
/// Return true if socket device
bool isSocket() const;
/// Return true if fifo (pipe) device
bool isFifo() const;
/// Return true if input path is a directory
bool isDirectory() const;
/// Return true if file is readable
bool isReadable() const;
/// Return true if file is writable
bool isWritable() const;
/// Return true if file is executable
bool isExecutable() const;
/// Return true if owner has read-write-execute permissions
bool isOwnerReadWriteExecute() const;
/// Return true if owner has read permissions
bool isOwnerReadable() const;
/// Return true if owner has write permissions
bool isOwnerWritable() const;
/// Return true if owner has execute permissions
bool isOwnerExecutable() const;
/// Return true if group has read-write-execute permissions
bool isGroupReadWriteExecute() const;
/// Return true if group has read permissions
bool isGroupReadable() const;
/// Return true if group has write permissions
bool isGroupWritable() const;
/// Return true if group has execute permissions
bool isGroupExecutable() const;
/// Return true if others have read-write-execute permissions
bool isOtherReadWriteExecute() const;
/// Return true if others have read permissions
bool isOtherReadable() const;
/// Return true if others have write permissions
bool isOtherWritable() const;
/// Return true if others have execute permissions
bool isOtherExecutable() const;
/// Return true if the file sets the user id on execution
bool isSetUid() const;
/// Return true if the file sets the group id on execution
bool isSetGid() const;
/// Return true if the file has the sticky bit set
bool isSetSticky() const;
/// Return the mode flags for this file
static FXuint mode(const FXString& file);
/// Change the mode flags for this file
static bool mode(const FXString& file,FXuint perm);
/// Return true if file exists
static bool exists(const FXString& file);
/// Return file size in bytes
static FXlong size(const FXString& file);
/**
* Return last modified time for this file, on filesystems
* where this is supported. This is the time when any data
* in the file was last modified.
*/
static FXTime modified(const FXString& file);
/**
* Return last accessed time for this file, on filesystems
* where this is supported.
*/
static FXTime accessed(const FXString& file);
/**
* Return created time for this file, on filesystems
* where this is supported. This is also the time when
* ownership, permissions, links, and other meta-data may
* have changed.
*/
static FXTime created(const FXString& file);
/**
* Return touched time for this file, on filesystems
* where this is supported. This is the time when anything
* at all, either contents or meta-data, about the file was
* changed.
*/
static FXTime touched(const FXString& file);
/// Return true if file is hidden
static bool isHidden(const FXString& file);
/// Return true if input path is a file name
static bool isFile(const FXString& file);
/// Return true if input path is a link
static bool isLink(const FXString& file);
/// Return true if input path is a directory
static bool isDirectory(const FXString& file);
/// Return true if file is readable
static bool isReadable(const FXString& file);
/// Return true if file is writable
static bool isWritable(const FXString& file);
/// Return true if file is executable
static bool isExecutable(const FXString& file);
/// Return true if owner has read-write-execute permissions
static bool isOwnerReadWriteExecute(const FXString& file);
/// Return true if owner has read permissions
static bool isOwnerReadable(const FXString& file);
/// Return true if owner has write permissions
static bool isOwnerWritable(const FXString& file);
/// Return true if owner has execute permissions
static bool isOwnerExecutable(const FXString& file);
/// Return true if group has read-write-execute permissions
static bool isGroupReadWriteExecute(const FXString& file);
/// Return true if group has read permissions
static bool isGroupReadable(const FXString& file);
/// Return true if group has write permissions
static bool isGroupWritable(const FXString& file);
/// Return true if group has execute permissions
static bool isGroupExecutable(const FXString& file);
/// Return true if others have read-write-execute permissions
static bool isOtherReadWriteExecute(const FXString& file);
/// Return true if others have read permissions
static bool isOtherReadable(const FXString& file);
/// Return true if others have write permissions
static bool isOtherWritable(const FXString& file);
/// Return true if others have execute permissions
static bool isOtherExecutable(const FXString& file);
/// Return true if the file sets the user id on execution
static bool isSetUid(const FXString& file);
/// Return true if the file sets the group id on execution
static bool isSetGid(const FXString& file);
/// Return true if the file has the sticky bit set
static bool isSetSticky(const FXString& file);
};
}
#endif
|