xv
15
FILE ATTRIBUTES
279
15.1
Retrieving File Information:
stat()
................................................................................. 279
15.2
File Timestamps......................................................................................................... 285
15.2.1
Changing File Timestamps with
utime()
and
utimes()
................................. 287
15.2.2
Changing File Timestamps with
utimensat()
and
futimens()
........................ 289
15.3
File Ownership ......................................................................................................... 291
15.3.1
Ownership of New Files ........................................................................ 291
15.3.2
Changing File Ownership:
chown()
,
fchown()
, and
lchown()
....................... 291
15.4
File Permissions ......................................................................................................... 294
15.4.1
Permissions on Regular Files ................................................................... 294
15.4.2
Permissions on Directories...................................................................... 297
15.4.3
Permission-Checking Algorithm ............................................................... 297
15.4.4
Checking File Accessibility:
access()
......................................................... 299
15.4.5
Set-User-ID, Set-Group-ID, and Sticky Bits ................................................. 300
15.4.6
The Process File Mode Creation Mask:
umask()
........................................ 301
15.4.7
Changing File Permissions:
chmod()
and
fchmod()
..................................... 303
15.5
I-node Flags (
ext2
Extended File Attributes) ................................................................... 304
15.6
Summary.................................................................................................................. 308
15.7
Exercises .................................................................................................................. 309
Chia sẻ với bạn bè của bạn: |