mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
allow getting acls of files
This commit is contained in:
parent
acd992ad8c
commit
3c5e45dc54
12 changed files with 237 additions and 13 deletions
|
|
@ -150,7 +150,7 @@ class Parser {
|
|||
];
|
||||
}
|
||||
|
||||
public function parseDir($output, $basePath) {
|
||||
public function parseDir($output, $basePath, callable $aclCallback) {
|
||||
//last line is used space
|
||||
array_pop($output);
|
||||
$regex = '/^\s*(.*?)\s\s\s\s+(?:([NDHARS]*)\s+)?([0-9]+)\s+(.*)$/';
|
||||
|
|
@ -162,7 +162,10 @@ class Parser {
|
|||
if ($name !== '.' and $name !== '..') {
|
||||
$mode = $this->parseMode($mode);
|
||||
$time = strtotime($time . ' ' . $this->timeZone);
|
||||
$content[] = new FileInfo($basePath . '/' . $name, $name, $size, $time, $mode);
|
||||
$path = $basePath . '/' . $name;
|
||||
$content[] = new FileInfo($path, $name, $size, $time, $mode, function () use ($aclCallback, $path) {
|
||||
return $aclCallback($path);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue