Initial commit
Working directory listing. Hardcoded sidebar template.
This commit is contained in:
23
source/lib/MediaListing/File.class.php
Normal file
23
source/lib/MediaListing/File.class.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
class MediaListing_File extends MediaListing_FileObject {
|
||||
|
||||
protected $size;
|
||||
|
||||
public function __construct($path) {
|
||||
if ( ! is_file($path)) {
|
||||
throw new MediaListing_Exception_NotAFile($path);
|
||||
}
|
||||
|
||||
parent::__construct(parent::TYPE_File, $path);
|
||||
|
||||
$this->size = filesize($this->path);
|
||||
}
|
||||
|
||||
public function size() {
|
||||
return $this->size;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user