mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
use system.dos_attr.* for both mode and stat info
this enables getting all the info needed for the FileInfo in a single request, instead of requiring two
This commit is contained in:
parent
63319ec68b
commit
b594f7c408
2 changed files with 30 additions and 36 deletions
|
|
@ -94,9 +94,7 @@ class NativeShare extends AbstractShare {
|
|||
$name = $file['name'];
|
||||
if ($name !== '.' and $name !== '..') {
|
||||
$fullPath = $path . '/' . $name;
|
||||
$files [] = new NativeFileInfo($this, $fullPath, $name, function () use ($fullPath) {
|
||||
return $this->getStat($fullPath);
|
||||
});
|
||||
$files [] = new NativeFileInfo($this, $fullPath, $name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +107,12 @@ class NativeShare extends AbstractShare {
|
|||
* @return \Icewind\SMB\IFileInfo
|
||||
*/
|
||||
public function stat($path) {
|
||||
return new NativeFileInfo($this, $path, self::mb_basename($path), $this->getStat($path));
|
||||
$info = new NativeFileInfo($this, $path, self::mb_basename($path));
|
||||
|
||||
// trigger attribute loading
|
||||
$info->getSize();
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue