r69363 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69362‎ | r69363 | r69364 >
Date:00:16, 15 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Work on porting WP filesystem abstraction classes
Modified paths:
  • /trunk/extensions/Deployment/includes/filesystems/Ssh2Filesystem.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Deployment/includes/filesystems/Ssh2Filesystem.php
@@ -239,7 +239,7 @@
240240 /**
241241 * @see Filesystem::getContents
242242 */
243 - public function getContents() {
 243+ public function getContents( $file ) {
244244 return file_get_contents( 'ssh2.sftp://' . $this->sftpConnection . '/' . ltrim( $file, '/' ) );
245245 }
246246
@@ -307,35 +307,35 @@
308308 * @see Filesystem::getSize
309309 */
310310 public function getSize( $file ) {
311 -
 311+ return filesize( 'ssh2.sftp://' . $this->sftpConnection . '/' . ltrim( $file, '/' ) );
312312 }
313313
314314 /**
315315 * @see Filesystem::isDir
316316 */
317317 public function isDir( $path ) {
318 -
 318+ return is_dir( 'ssh2.sftp://' . $this->sftpConnection . '/' . ltrim( $file, '/' ) );
319319 }
320320
321321 /**
322322 * @see Filesystem::isFile
323323 */
324324 public function isFile( $path ) {
325 -
 325+ return is_file( 'ssh2.sftp://' . $this->sftpConnection . '/' . ltrim( $file, '/' ) );
326326 }
327327
328328 /**
329329 * @see Filesystem::isReadable
330330 */
331331 public function isReadable( $file ) {
332 -
 332+ return is_readable( 'ssh2.sftp://' . $this->sftpConnection . '/' . ltrim( $file, '/' ) );
333333 }
334334
335335 /**
336336 * @see Filesystem::isWritable
337337 */
338338 public function isWritable( $file ) {
339 -
 339+ return is_writable( 'ssh2.sftp://' . $this->sftpConnection . '/' . ltrim( $file, '/' ) );
340340 }
341341
342342 /**

Status & tagging log