@@ 19-43 (lines=25) @@ | ||
16 | $flags = array(); |
|
17 | $perms = $fileInfo->getPerms(); |
|
18 | ||
19 | if ( ( $perms & 0xC000 ) === 0xC000 ) { |
|
20 | $type = 'File socket'; |
|
21 | $flags[] = 's'; |
|
22 | } elseif ( ( $perms & 0xA000 ) === 0xA000 ) { |
|
23 | $type = 'File symlink'; |
|
24 | $flags[] = 'l'; |
|
25 | } elseif ( ( $perms & 0x8000 ) === 0x8000 ) { |
|
26 | $type = 'File'; |
|
27 | $flags[] = '-'; |
|
28 | } elseif ( ( $perms & 0x6000 ) === 0x6000 ) { |
|
29 | $type = 'Block special file'; |
|
30 | $flags[] = 'b'; |
|
31 | } elseif ( ( $perms & 0x4000 ) === 0x4000 ) { |
|
32 | $type = 'Directory'; |
|
33 | $flags[] = 'd'; |
|
34 | } elseif ( ( $perms & 0x2000 ) === 0x2000 ) { |
|
35 | $type = 'Character special file'; |
|
36 | $flags[] = 'c'; |
|
37 | } elseif ( ( $perms & 0x1000 ) === 0x1000 ) { |
|
38 | $type = 'FIFO pipe file'; |
|
39 | $flags[] = 'p'; |
|
40 | } else { |
|
41 | $type = 'Unknown file'; |
|
42 | $flags[] = 'u'; |
|
43 | } |
|
44 | ||
45 | // owner |
|
46 | $flags[] = ( ( $perms & 0x0100 ) ? 'r' : '-' ); |
@@ 16-40 (lines=25) @@ | ||
13 | $flags = array(); |
|
14 | $perms = $variable->getPerms(); |
|
15 | ||
16 | if ( ( $perms & 0xC000 ) === 0xC000 ) { |
|
17 | $type = 'File socket'; |
|
18 | $flags[] = 's'; |
|
19 | } elseif ( ( $perms & 0xA000 ) === 0xA000 ) { |
|
20 | $type = 'File symlink'; |
|
21 | $flags[] = 'l'; |
|
22 | } elseif ( ( $perms & 0x8000 ) === 0x8000 ) { |
|
23 | $type = 'File'; |
|
24 | $flags[] = '-'; |
|
25 | } elseif ( ( $perms & 0x6000 ) === 0x6000 ) { |
|
26 | $type = 'Block special file'; |
|
27 | $flags[] = 'b'; |
|
28 | } elseif ( ( $perms & 0x4000 ) === 0x4000 ) { |
|
29 | $type = 'Directory'; |
|
30 | $flags[] = 'd'; |
|
31 | } elseif ( ( $perms & 0x2000 ) === 0x2000 ) { |
|
32 | $type = 'Character special file'; |
|
33 | $flags[] = 'c'; |
|
34 | } elseif ( ( $perms & 0x1000 ) === 0x1000 ) { |
|
35 | $type = 'FIFO pipe file'; |
|
36 | $flags[] = 'p'; |
|
37 | } else { |
|
38 | $type = 'Unknown file'; |
|
39 | $flags[] = 'u'; |
|
40 | } |
|
41 | ||
42 | // owner |
|
43 | $flags[] = ( ( $perms & 0x0100 ) ? 'r' : '-' ); |