| Solstice documentation | Contained in the Solstice distribution. |
Solstice::Resource::Directory - A model representing a directory
package Solstice::Resource::Directory; use Solstice::Resource::Directory;
No symbols exported.
Return a string containing a description of this resource.
Return TRUE if the resource is a container, FALSE otherwise.
Fetch the contents of this directory. Return TRUE on success, FALSE otherwise.
Returns TRUE if the directory contains the passed $filename, FALSE otherwise.
Returns TRUE if passed $name is valid for a child resource, FALSE otherwise.
Recursively store children.
Catalyst Group, <catalyst@u.washington.edu>
$Revision: 747 $
Copyright 1998-2007 Office of Learning Technologies, University of Washington
Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.opensource.org/licenses/ecl1.php
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| Solstice documentation | Contained in the Solstice distribution. |
package Solstice::Resource::Directory; # $Id: Directory.pm 747 2005-09-30 19:38:37Z jlaney $
use 5.006_000; use strict; use warnings; use base qw( Solstice::Resource ); use constant TRUE => 1; use constant FALSE => 0; use constant TYPE_DESCRIPTION => 'Folder'; our ($VERSION) = ('$Revision: 747 $' =~ /^\$Revision:\s*([\d.]*)/);
sub getContentTypeDescription { return TYPE_DESCRIPTION; }
sub isContainer { return TRUE; }
sub list { my $self = shift; die (ref($self) . "->list(): Not implemented\n"); }
sub contains { my $self = shift; die (ref($self) . "->contains(): Not implemented\n"); }
sub addChild { my $self = shift; $self->_taint(); return $self->Solstice::Tree::addChild(@_); }
sub isValidChildName { return TRUE; }
sub getFileClass { my $self = shift; warn ref($self) . "->getFileClass(): Not implemented\n"; return; }
sub _store { my $self = shift; my $return = FALSE; for my $child ($self->getChildren()) { $return &= $child->store(); } return $return; } 1; __END__