Question: In struct stat , the variable that contains the file size is st_size. What is the variable that contains the file permission (protection)? What is

  1. In struct stat, the variable that contains the file size is st_size. What is the variable that contains the file permission (protection)?
  2. What is the POSIX macro to check if a file is a directory?
  3. The flag defined for the st_mode field for a directory is S_IFDIR. What is its bitmask value? In Binary: In Octal:
  4. What is the bit mask to check for owner has read permission? In Binary: In Octal:
  5. What is the bit mask to check if a file has all the following permissions owner can read, write; group can read only; others cannot read/write/execute. In Binary: In Octal:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!