| @@ 36-60 (lines=25) @@ | ||
| 33 | $flags = array(); |
|
| 34 | $perms = $fileInfo->getPerms(); |
|
| 35 | ||
| 36 | if (($perms & 0xC000) === 0xC000) { |
|
| 37 | $type = 'File socket'; |
|
| 38 | $flags[] = 's'; |
|
| 39 | } elseif (($perms & 0xA000) === 0xA000) { |
|
| 40 | $type = 'File symlink'; |
|
| 41 | $flags[] = 'l'; |
|
| 42 | } elseif (($perms & 0x8000) === 0x8000) { |
|
| 43 | $type = 'File'; |
|
| 44 | $flags[] = '-'; |
|
| 45 | } elseif (($perms & 0x6000) === 0x6000) { |
|
| 46 | $type = 'Block special file'; |
|
| 47 | $flags[] = 'b'; |
|
| 48 | } elseif (($perms & 0x4000) === 0x4000) { |
|
| 49 | $type = 'Directory'; |
|
| 50 | $flags[] = 'd'; |
|
| 51 | } elseif (($perms & 0x2000) === 0x2000) { |
|
| 52 | $type = 'Character special file'; |
|
| 53 | $flags[] = 'c'; |
|
| 54 | } elseif (($perms & 0x1000) === 0x1000) { |
|
| 55 | $type = 'FIFO pipe file'; |
|
| 56 | $flags[] = 'p'; |
|
| 57 | } else { |
|
| 58 | $type = 'Unknown file'; |
|
| 59 | $flags[] = 'u'; |
|
| 60 | } |
|
| 61 | ||
| 62 | // owner |
|
| 63 | $flags[] = (($perms & 0x0100) ? 'r' : '-'); |
|
| @@ 33-57 (lines=25) @@ | ||
| 30 | $flags = array(); |
|
| 31 | $perms = $variable->getPerms(); |
|
| 32 | ||
| 33 | if (($perms & 0xC000) === 0xC000) { |
|
| 34 | $type = 'File socket'; |
|
| 35 | $flags[] = 's'; |
|
| 36 | } elseif (($perms & 0xA000) === 0xA000) { |
|
| 37 | $type = 'File symlink'; |
|
| 38 | $flags[] = 'l'; |
|
| 39 | } elseif (($perms & 0x8000) === 0x8000) { |
|
| 40 | $type = 'File'; |
|
| 41 | $flags[] = '-'; |
|
| 42 | } elseif (($perms & 0x6000) === 0x6000) { |
|
| 43 | $type = 'Block special file'; |
|
| 44 | $flags[] = 'b'; |
|
| 45 | } elseif (($perms & 0x4000) === 0x4000) { |
|
| 46 | $type = 'Directory'; |
|
| 47 | $flags[] = 'd'; |
|
| 48 | } elseif (($perms & 0x2000) === 0x2000) { |
|
| 49 | $type = 'Character special file'; |
|
| 50 | $flags[] = 'c'; |
|
| 51 | } elseif (($perms & 0x1000) === 0x1000) { |
|
| 52 | $type = 'FIFO pipe file'; |
|
| 53 | $flags[] = 'p'; |
|
| 54 | } else { |
|
| 55 | $type = 'Unknown file'; |
|
| 56 | $flags[] = 'u'; |
|
| 57 | } |
|
| 58 | ||
| 59 | // owner |
|
| 60 | $flags[] = (($perms & 0x0100) ? 'r' : '-'); |
|