Issues (372)

src/MountableFilesystemTrait.php (31 issues)

1
<?php
2
3
/**
4
 * This file is part of the sj-i/php-fuse package.
5
 *
6
 * (c) sji <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Fuse;
15
16
use Fuse\Libc\Fcntl\Flock;
17
use Fuse\Libc\Fuse\FuseBufVec;
18
use Fuse\Libc\Fuse\FuseConnInfo;
19
use Fuse\Libc\Fuse\FuseDirFill;
20
use Fuse\Libc\Fuse\FuseDirHandle;
21
use Fuse\Libc\Fuse\FuseFileInfo;
22
use Fuse\Libc\Fuse\FuseFillDir;
23
use Fuse\Libc\Fuse\FuseIoctlArgPointer;
24
use Fuse\Libc\Fuse\FuseIoctlDataPointer;
25
use Fuse\Libc\Fuse\FusePollHandle;
26
use Fuse\Libc\Fuse\FusePrivateData;
27
use Fuse\Libc\Fuse\FuseReadDirBuffer;
28
use Fuse\Libc\String\CBytesBuffer;
29
use Fuse\Libc\String\CStringBuffer;
30
use Fuse\Libc\Sys\Stat\Stat;
31
use Fuse\Libc\Sys\StatVfs\StatVfs;
32
use Fuse\Libc\Time\TimeSpec;
33
use Fuse\Libc\Utime\UtimBuf;
34
use TypedCData\TypedCDataArray;
0 ignored issues
show
The type TypedCData\TypedCDataArray was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
35
36
trait MountableFilesystemTrait
37
{
38
    public function getOperations(): FuseOperations
39
    {
40
        $fuse_operations = new FuseOperations();
41
42
        $fuse_operations->getattr = [$this, 'getattr'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'getattr') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\getattr_op|Fuse\getattr_typed_op|null of property $getattr.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
43
        $fuse_operations->readlink = [$this, 'readlink'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'readlink') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\readlink_op|Fuse\readlink_typed_op|null of property $readlink.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
44
        /** @psalm-suppress DeprecatedProperty */
45
        $fuse_operations->getdir = [$this, 'getdir'];
0 ignored issues
show
Deprecated Code introduced by
The property Fuse\FuseOperations::$getdir has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

45
        /** @scrutinizer ignore-deprecated */ $fuse_operations->getdir = [$this, 'getdir'];
Loading history...
Documentation Bug introduced by
It seems like array($this, 'getdir') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\getdir_op|Fuse\getdir_typed_op|null of property $getdir.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
46
        $fuse_operations->mknod = [$this, 'mknod'];
47
        $fuse_operations->mkdir = [$this, 'mkdir'];
48
        $fuse_operations->unlink = [$this, 'unlink'];
49
        $fuse_operations->rmdir = [$this, 'rmdir'];
50
        $fuse_operations->symlink = [$this, 'symlink'];
51
        $fuse_operations->rename = [$this, 'rename'];
52
        $fuse_operations->link = [$this, 'link'];
53
        $fuse_operations->chmod = [$this, 'chmod'];
54
        $fuse_operations->chown = [$this, 'chown'];
55
        $fuse_operations->truncate = [$this, 'truncate'];
56
        $fuse_operations->utime = [$this, 'utime'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'utime') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\utime_op|Fuse\utime_typed_op|null of property $utime.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
57
        $fuse_operations->open = [$this, 'open'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'open') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\open_op|Fuse\open_typed_op|null of property $open.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
58
        $fuse_operations->read = [$this, 'read'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'read') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\read_op|Fuse\read_typed_op|null of property $read.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
59
        $fuse_operations->write = [$this, 'write'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'write') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\write_op|Fuse\write_typed_op|null of property $write.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
60
        $fuse_operations->statfs = [$this, 'statfs'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'statfs') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\statfs_op|Fuse\statfs_typed_op|null of property $statfs.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
61
        $fuse_operations->flush = [$this, 'flush'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'flush') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\flush_op|Fuse\flush_typed_op|null of property $flush.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
62
        $fuse_operations->release = [$this, 'release'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'release') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\release_op|Fuse\release_typed_op|null of property $release.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
63
        $fuse_operations->fsync = [$this, 'fsync'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'fsync') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\fsync_op|Fuse\fsync_typed_op|null of property $fsync.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
64
        $fuse_operations->setxattr = [$this, 'setxattr'];
65
        $fuse_operations->getxattr = [$this, 'getxattr'];
66
        $fuse_operations->listxattr = [$this, 'listxattr'];
67
        $fuse_operations->removexattr = [$this, 'removexattr'];
68
        $fuse_operations->opendir = [$this, 'opendir'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'opendir') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\opendir_op|Fuse\opendir_typed_op|null of property $opendir.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
69
        $fuse_operations->readdir = [$this, 'readdir'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'readdir') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\readdir_op|Fuse\readdir_typed_op|null of property $readdir.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
70
        $fuse_operations->releasedir = [$this, 'releasedir'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'releasedir') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\releasedir_op|Fuse\releasedir_typed_op|null of property $releasedir.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
71
        $fuse_operations->fsyncdir = [$this, 'fsyncdir'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'fsyncdir') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\fsyncdir_op|Fuse\fsyncdir_typed_op|null of property $fsyncdir.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
72
        $fuse_operations->init = [$this, 'init'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'init') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\init_op|Fuse\init_typed_op|null of property $init.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
73
        $fuse_operations->destroy = [$this, 'destroy'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'destroy') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\destroy_op|Fuse\destroy_typed_op|null of property $destroy.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
74
        $fuse_operations->access = [$this, 'access'];
75
        $fuse_operations->create = [$this, 'create'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'create') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\create_op|Fuse\create_typed_op|null of property $create.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
76
        $fuse_operations->ftruncate = [$this, 'ftruncate'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'ftruncate') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\ftruncate_op|Fuse\ftruncate_typed_op|null of property $ftruncate.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
77
        $fuse_operations->fgetattr = [$this, 'fgetattr'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'fgetattr') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\fgetattr_op|Fuse\fgetattr_typed_op|null of property $fgetattr.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
78
        $fuse_operations->lock = [$this, 'lock'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'lock') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\lock_op|Fuse\lock_typed_op|null of property $lock.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
79
        $fuse_operations->utimens = [$this, 'utimens'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'utimens') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\utimens_op|Fuse\utimens_typed_op|null of property $utimens.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
80
        $fuse_operations->bmap = [$this, 'bmap'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'bmap') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\bmap_op|Fuse\bmap_typed_op|null of property $bmap.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
81
        $fuse_operations->ioctl = [$this, 'ioctl'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'ioctl') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\ioctl_op|Fuse\ioctl_typed_op|null of property $ioctl.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
82
        $fuse_operations->poll = [$this, 'poll'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'poll') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\poll_op|Fuse\poll_typed_op|null of property $poll.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
83
        $fuse_operations->write_buf = [$this, 'writeBuf'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'writeBuf') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\write_buf_op|Fuse\write_buf_typed_op|null of property $write_buf.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
84
        $fuse_operations->read_buf = [$this, 'readBuf'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'readBuf') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\read_buf_op|Fuse\read_buf_typed_op|null of property $read_buf.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
85
        $fuse_operations->flock = [$this, 'flock'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'flock') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\flock_op|Fuse\flock_typed_op|null of property $flock.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
86
        $fuse_operations->fallocate = [$this, 'fallocate'];
0 ignored issues
show
Documentation Bug introduced by
It seems like array($this, 'fallocate') of type array<integer,Fuse\Mount...FilesystemTrait|string> is incompatible with the declared type Fuse\fallocate_op|Fuse\fallocate_typed_op|null of property $fallocate.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
87
        $fuse_operations->flag_nullpath_ok = $this->getFlagNullpathOk();
88
        $fuse_operations->flag_nopath = $this->getFlagNopath();
89
        $fuse_operations->flag_utime_omit_ok = $this->getFlagUtimeOmitOk();
90
91
        return $fuse_operations;
92
    }
93
94
    /**
95
     * int (*getattr) (const char *, struct stat *);
96
     */
97
    abstract public function getattr(string $path, Stat $stat): int;
98
99
    /**
100
     * int (*readlink) (const char *, char *, size_t);
101
     */
102
    abstract public function readlink(string $path, CStringBuffer $buffer, int $size): int;
103
104
    /**
105
     * int (*getdir) (const char *, fuse_dirh_t, fuse_dirfil_t);
106
     *
107
     * @deprecated
108
     */
109
    abstract public function getdir(string $path, FuseDirHandle $dirhandle, FuseDirFill $dirfill): int;
110
111
    /**
112
     * int (*mknod) (const char *, mode_t, dev_t);
113
     */
114
    abstract public function mknod(string $path, int $mode, int $dev): int;
115
116
    /**
117
     * int (*mkdir) (const char *, mode_t);
118
     */
119
    abstract public function mkdir(string $path, int $mode): int;
120
121
    /**
122
     * int (*unlink) (const char *);
123
     */
124
    abstract public function unlink(string $path): int;
125
126
    /**
127
     * int (*rmdir) (const char *);
128
     */
129
    abstract public function rmdir(string $path): int;
130
131
    /**
132
     * int (*symlink) (const char *, const char *);
133
     */
134
    abstract public function symlink(string $path, string $link): int;
135
136
    /**
137
     * int (*rename) (const char *, const char *);
138
     */
139
    abstract public function rename(string $from, string $to): int;
140
141
    /**
142
     * int (*link) (const char *, const char *);
143
     */
144
    abstract public function link(string $path, string $link): int;
145
146
    /**
147
     * int (*chmod) (const char *, mode_t);
148
     */
149
    abstract public function chmod(string $path, int $mode): int;
150
151
    /**
152
     * int (*chown) (const char *, uid_t, gid_t);
153
     */
154
    abstract public function chown(string $path, int $uid, int $gid): int;
155
156
    /**
157
     * int (*truncate) (const char *, off_t);
158
     */
159
    abstract public function truncate(string $path, int $offset): int;
160
161
    /**
162
     * int (*utime) (const char *, struct utimbuf *);
163
     */
164
    abstract public function utime(string $path, UtimBuf $utime_buf): int;
165
166
    /**
167
     * int (*open) (const char *, struct fuse_file_info *);
168
     */
169
    abstract public function open(string $path, FuseFileInfo $fuse_file_info): int;
170
171
    /**
172
     * int (*read) (const char *, char *, size_t, off_t, struct fuse_file_info *);
173
     */
174
    abstract public function read(
175
        string $path,
176
        CBytesBuffer $buffer,
177
        int $size,
178
        int $offset,
179
        FuseFileInfo $fuse_file_info
180
    ): int;
181
182
    /**
183
     * int (*write) (const char *, const char *, size_t, off_t, struct fuse_file_info *);
184
     */
185
    abstract public function write(
186
        string $path,
187
        string $buffer,
188
        int $size,
189
        int $offset,
190
        FuseFileInfo $fuse_file_info
191
    ): int;
192
193
    /**
194
     * int (*statfs) (const char *, struct statvfs *);
195
     */
196
    abstract public function statfs(string $path, StatVfs $statvfs): int;
197
198
    /**
199
     * int (*flush) (const char *, struct fuse_file_info *);
200
     */
201
    abstract public function flush(string $path, FuseFileInfo $fuse_file_info): int;
202
203
    /**
204
     * int (*release) (const char *, struct fuse_file_info *);
205
     */
206
    abstract public function release(string $path, FuseFileInfo $fuse_file_info): int;
207
208
    /**
209
     * int (*fsync) (const char *, int, struct fuse_file_info *);
210
     */
211
    abstract public function fsync(string $path, int $flags, FuseFileInfo $fuse_file_info): int;
212
213
    /**
214
     * int (*setxattr) (const char *, const char *, const char *, size_t, int);
215
     */
216
    abstract public function setxattr(string $path, string $name, string $value, int $size): int;
217
218
    /**
219
     * int (*getxattr) (const char *, const char *, char *, size_t);
220
     */
221
    abstract public function getxattr(string $path, string $name, ?string &$value, int $size): int;
222
223
    /**
224
     * int (*listxattr) (const char *, char *, size_t);*
225
     */
226
    abstract public function listxattr(string $path, ?string &$value, int $size): int;
227
228
    /**
229
     * int (*removexattr) (const char *, const char *);
230
     */
231
    abstract public function removexattr(string $path, string $name): int;
232
233
    /**
234
     * int (*opendir) (const char *, struct fuse_file_info *);
235
     */
236
    abstract public function opendir(string $path, FuseFileInfo $fuse_file_info): int;
237
238
    /**
239
     * int (*readdir) (const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *);
240
     */
241
    abstract public function readdir(
242
        string $path,
243
        FuseReadDirBuffer $buf,
244
        FuseFillDir $filler,
245
        int $offset,
246
        FuseFileInfo $fuse_file_info
247
    ): int;
248
249
    /**
250
     * int (*releasedir) (const char *, struct fuse_file_info *);
251
     */
252
    abstract public function releasedir(string $path, FuseFileInfo $fuse_file_info): int;
253
254
    /**
255
     * int (*fsyncdir) (const char *, int, struct fuse_file_info *);
256
     */
257
    abstract public function fsyncdir(string $path, FuseFileInfo $fuse_file_info): int;
258
259
    /**
260
     * void *(*init) (struct fuse_conn_info *conn);
261
     */
262
    abstract public function init(FuseConnInfo $conn): ?FusePrivateData;
263
264
    /**
265
     * void (*destroy) (void *);
266
     */
267
    abstract public function destroy(?FusePrivateData $private_data): void;
268
269
    /**
270
     * int (*access) (const char *, int);
271
     */
272
    abstract public function access(string $path, int $mode): int;
273
274
    /**
275
     * int (*create) (const char *, mode_t, struct fuse_file_info *);
276
     */
277
    abstract public function create(string $path, int $mode, FuseFileInfo $fuse_file_info): int;
278
279
    /**
280
     * int (*ftruncate) (const char *, off_t, struct fuse_file_info *);
281
     */
282
    abstract public function ftruncate(string $path, int $offset, FuseFileInfo $fuse_file_info): int;
283
284
    /**
285
     * int (*fgetattr) (const char *, struct stat *, struct fuse_file_info *);
286
     */
287
    abstract public function fgetattr(string $path, Stat $stat, FuseFileInfo $fuse_file_info): int;
288
289
    /**
290
     * int (*lock) (const char *, struct fuse_file_info *, int cmd, struct flock *);
291
     */
292
    abstract public function lock(string $path, FuseFileInfo $fuse_file_info, int $cmd, Flock $flock): int;
293
294
    /**
295
     * int (*utimens) (const char *, const struct timespec tv[2]);
296
     *
297
     * @param TypedCDataArray<TimeSpec> $tv
298
     */
299
    abstract public function utimens(string $path, TypedCDataArray $tv): int;
300
301
    /**
302
     * int (*bmap) (const char *, size_t blocksize, uint64_t *idx);
303
     */
304
    abstract public function bmap(string $path, int $blocksize, int &$idx): int;
305
306
    /**
307
     * unsigned int flag_nullpath_ok:1;
308
     * unsigned int flag_nopath:1;
309
     * unsigned int flag_utime_omit_ok:1;
310
     * unsigned int flag_reserved:29;
311
     */
312
    abstract public function setFlagNullpathOk(bool $flag): void;
313
    abstract public function getFlagNullpathOk(): bool;
314
    abstract public function setFlagNopath(bool $flag): void;
315
    abstract public function getFlagNopath(): bool;
316
    abstract public function setFlagUtimeOmitOk(bool $flag): void;
317
    abstract public function getFlagUtimeOmitOk(): bool;
318
319
    /**
320
     * int (*ioctl) (const char *, int cmd, void *arg, struct fuse_file_info *, unsigned int flags, void *data);
321
     */
322
    abstract public function ioctl(
323
        string $path,
324
        int $cmd,
325
        FuseIoctlArgPointer $arg,
326
        FuseFileInfo $fuse_file_info,
327
        int $flags,
328
        FuseIoctlDataPointer $data
329
    ): int;
330
331
    /**
332
     * int (*poll) (const char *, struct fuse_file_info *, struct fuse_pollhandle *ph, unsigned *reventsp);
333
     */
334
    abstract public function poll(
335
        string $path,
336
        FuseFileInfo $fuse_file_info,
337
        FusePollHandle $fuse_pollhandle,
338
        int &$reventsp
339
    ): int;
340
341
    /**
342
     * int (*write_buf) (const char *, struct fuse_bufvec *buf, off_t off, struct fuse_file_info *);
343
     */
344
    abstract public function writeBuf(string $path, FuseBufVec $buf, int $offset, FuseFileInfo $fuse_file_info): int;
345
346
    /**
347
     * int (*read_buf) (const char *, struct fuse_bufvec **bufp, size_t size, off_t off, struct fuse_file_info *);
348
     *
349
     * @param TypedCDataArray<FuseBufVec> $bufp
350
     */
351
    abstract public function readBuf(
352
        string $path,
353
        TypedCDataArray $bufp,
354
        int $size,
355
        int $offset,
356
        FuseFileInfo $fuse_file_info
357
    ): int;
358
359
    /**
360
     * int (*flock) (const char *, struct fuse_file_info *, int op);
361
     */
362
    abstract public function flock(string $path, FuseFileInfo $fuse_file_info, int $op): int;
363
364
    /**
365
     * int (*fallocate) (const char *, int, off_t, off_t, struct fuse_file_info *);
366
     */
367
    abstract public function fallocate(string $path, int $mode, int $offset, FuseFileInfo $fuse_file_info): int;
368
}
369