38 $prefix =
'mediawiki.compress.7z://';
40 return substr( $path, strlen( $prefix ) );
44 if ( $mode[0] ==
'r' ) {
46 } elseif ( $mode[0] ==
'w' ) {
57 $this->stream = popen(
$command, $mode[0] );
58 return ( $this->stream !==
false );
68 return fclose( $this->stream );
72 return fflush( $this->stream );
76 return fread( $this->stream, $count );
80 return fwrite( $this->stream, $data );
84 return ftell( $this->stream );
88 return feof( $this->stream );
92 return fseek( $this->stream, $offset, $whence );
96stream_wrapper_register(
'mediawiki.compress.7z', SevenZipStream::class );
wfEscapeShellArg()
Version of escapeshellarg() that works better on Windows.
wfIsWindows()
Check if the operating system is Windows.
Stream wrapper around 7za filter program.
stream_open( $path, $mode, $options, &$opened_path)
stream_seek( $offset, $whence)
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options