[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

banghart lon-capa-cvs@mail.lon-capa.org
Fri, 27 Aug 2004 18:37:03 -0000


banghart		Fri Aug 27 14:37:03 2004 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  
  	Removed unused portfolio routines, added stub for disk usage.
  	Disk usage not working yet. Work in progress.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.532 loncom/lonnet/perl/lonnet.pm:1.533
--- loncom/lonnet/perl/lonnet.pm:1.532	Wed Aug 25 12:03:17 2004
+++ loncom/lonnet/perl/lonnet.pm	Fri Aug 27 14:37:03 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.532 2004/08/25 16:03:17 albertel Exp $
+# $Id: lonnet.pm,v 1.533 2004/08/27 18:37:03 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3679,38 +3679,11 @@
            $deleteflag);
 }
 
-
-# ------------------------------------------------------------ Portfolio Director Lister
-# returns listing of contents of user's /userfiles/portfolio/ directory
-# 
-
-sub portfoliolist {
-    my ($currentPath, $currentFile) = @_;
-    my ($udom, $uname, $portfolioRoot);
-    $uname=$ENV{'user.name'};
-    $udom=$ENV{'user.domain'};
-    # really should interrogate the system for home directory information, but . . .
-    $portfolioRoot = '/home/httpd/lonUsers/'.$udom.'/';
-    $uname =~ /^(.?)(.?)(.?)/;
-    $portfolioRoot = $portfolioRoot.$1.'/'.$2.'/'.$3.'/'.$uname.'/userfiles/portfolio';
-    my $listing = &reply('ls:'.$portfolioRoot.$currentPath, &homeserver($uname,$udom));
-    return $listing;
-}
-
-sub portfoliomanage {
-
-#FIXME please user the existing remove userfile function instead and
-#add a userfilerename functions.
-#FIXME uhome should never be an argument to any lonnet functions
-
-    # handles deleting and renaming files in user's userfiles/portfolio/ directory
-    # 
-    my ($filename, $fileaction, $filenewname) = @_;
-    my ($udom, $uname, $uhome);
-    $uname=$ENV{'user.name'};
-    $udom=$ENV{'user.domain'};
-    $uhome=$ENV{'user.home'};
-    my $listing = reply('portfoliomanage:'.$uname.':'.$udom.':'.$filename.':'.$fileaction.':'.$filenewname, $uhome);
+# ------------------------------------------------------------ Disk usage
+sub diskusage{
+    my ($udom,$uname,$directoryRoot)=@_;
+    $directoryRoot =~ s/\/$//;
+    my $listing=reply('du:'.$directoryRoot,homeserver($uname,$udom))
     return $listing;
 }