Skip to content

Commit

Permalink
MDL-18111 improving file api comments and docs, fixing license header
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed May 21, 2009
1 parent 64a19b3 commit 33488ad
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 9 deletions.
32 changes: 28 additions & 4 deletions lib/file/file_exceptions.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<?php //$Id$
<?php

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* File handling related exceptions.
*
* @package moodlecore
* @subpackage file
* @copyright 2008 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

/**
* Basic file related exception class
Expand All @@ -10,7 +34,7 @@ function __construct($errorcode, $a=NULL, $debuginfo=null) {
}

/**
* Table does not exist problem exception
* Can not create file exception
*/
class stored_file_creation_exception extends file_exception {
function __construct($contextid, $filearea, $itemid, $filepath, $filename, $debuginfo=null) {
Expand All @@ -25,7 +49,7 @@ function __construct($contextid, $filearea, $itemid, $filepath, $filename, $debu
}

/**
* Table does not exist problem exception
* No file access excetion.
*/
class file_access_exception extends file_exception {
function __construct($debuginfo=null) {
Expand All @@ -34,7 +58,7 @@ function __construct($debuginfo=null) {
}

/**
* Hash file content problem
* Hash file content problem exception.
*/
class file_pool_content_exception extends file_exception {
function __construct($contenthash, $debuginfo=null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/filelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
*
* @package moodlecore
* @subpackage file
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

/** @var string unique string constant. */
Expand Down
27 changes: 26 additions & 1 deletion lib/packer/file_archive.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
<?php //$Id$
<?php

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.


/**
* Abstraction of general file archives.
*
* @package moodlecore
* @subpackage file-packer
* @copyright 2008 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

abstract class file_archive implements Iterator {

Expand Down
27 changes: 26 additions & 1 deletion lib/packer/file_packer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
<?php //$Id$
<?php

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.


/**
* Abstraction of general file packer.
*
* @package moodlecore
* @subpackage file-packer
* @copyright 2008 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

/**
* Abstract class for archiving of files.
Expand Down
27 changes: 26 additions & 1 deletion lib/packer/zip_archive.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
<?php //$Id$
<?php

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.


/**
* Implementation of zip file archive.
*
* @package moodlecore
* @subpackage file-packer
* @copyright 2008 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

require_once("$CFG->libdir/packer/file_archive.php");

Expand Down
27 changes: 26 additions & 1 deletion lib/packer/zip_packer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
<?php //$Id$
<?php

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.


/**
* Implementation of zip packer.
*
* @package moodlecore
* @subpackage file-packer
* @copyright 2008 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

require_once("$CFG->libdir/packer/file_packer.php");
require_once("$CFG->libdir/packer/zip_archive.php");
Expand Down

0 comments on commit 33488ad

Please sign in to comment.