--- loncom/lond 2004/06/21 13:25:53 1.200 +++ loncom/lond 2004/06/21 14:08:20 1.201 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.200 2004/06/21 13:25:53 matthew Exp $ +# $Id: lond,v 1.201 2004/06/21 14:08:20 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -56,7 +56,7 @@ my $DEBUG = 11; # Non zero to en my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.200 $'; #' stupid emacs +my $VERSION='$Revision: 1.201 $'; #' stupid emacs my $remoteVERSION; my $currenthostid; my $currentdomainid; @@ -3033,6 +3033,24 @@ sub make_new_child { Reply($client, "refused\n", $userinput); } +# ----------------------------------------- portfolio directory list (portls) + } elsif ($userinput =~ /^portls/) { + if(isClient) { + my ($cmd,$uname,$udom)=split(/:/,$userinput); + my $udir=propath($udom,$uname).'/userfiles/portfolio'; + my $dirLine=''; + my $dirContents=''; + if (opendir(LSDIR,$udir.'/')){ + while ($dirLine = readdir(LSDIR)){ + $dirContents = $dirContents.$dirLine.'
'; + } + } else { + $dirContents = "No directory found\n"; + } + print $client $dirContents."\n"; + } else { + Reply($client, "refused\n", $userinput); + } # -------------------------------------------------------------------------- ls } elsif ($userinput =~ /^ls/) { if(isClient) {