Update of /cvsroot/sandweb/sandweb/lib/SandWeb/File
In directory sc8-pr-cvs1:/tmp/cvs-serv15829/SandWeb/File
Modified Files:
Unix.pm
Log Message:
beginning of POD docs
Index: Unix.pm
===================================================================
RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File/Unix.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -U2 -r1.6 -r1.7
--- Unix.pm 26 Aug 2002 06:59:47 -0000 1.6
+++ Unix.pm 5 Jan 2003 08:59:08 -0000 1.7
@@ -1,7 +1,15 @@
#lib/SandWeb/File/Unix.pm
#
-# This class handles all file viewing and operations on Unix systems.
-# It is only intended to be called by the File class.
-#
+
+=pod
+=head1
+
+SandWeb::File::Unix
+
+This class handles all file viewing and operations on Unix systems.
+It is only intended to be called by the File class.
+
+=cut
+
# SandWeb (Web-based VCS client)
#
@@ -24,9 +32,32 @@
#
+=head1
+
+part of the SandWeb::File::Unix package
+
+=cut
+
package SandWeb::File::Unix;
+=head1
+
+uses SandWeb::Shell and SandWeb::Security
+
+=cut
+
use SandWeb::Shell;
use SandWeb::Security;
+=head1
+
+Methods
+
+
+new
+
+ instantiates a new object
+
+=cut
+
sub new {
my $class = shift;
@@ -79,8 +110,23 @@
}
+=head1
+
+get_owner
+
+ returns the owner of the current file
+
+=cut
+
sub get_owner {
my $self = shift;
return $self->{'owner'};
}
+=head1
+
+get_group
+
+ returns the group of the current file
+
+=cut
sub get_group {
@@ -88,4 +134,11 @@
return $self->{'group'};
}
+=head1
+
+get_filename
+
+ returns the filename of the current file
+
+=cut
sub get_filename {
@@ -94,4 +147,12 @@
}
+=head1
+
+get_location
+
+ returns the location (directory) of the current file
+
+=cut
+
sub get_location {
my $self = shift;
@@ -99,8 +160,23 @@
}
+=head1
+
+get_permissions
+
+ returns the permissions of the current file
+
+=cut
+
sub get_permissions {
my $self = shift;
return $self->{'perms'};
}
+=head1
+
+get_file_type
+
+ returns the file_type of the current file
+
+=cut
sub get_file_type {
@@ -131,4 +207,11 @@
return $file_type;
}
+=head1
+
+get_size
+
+ returns the size of the current file
+
+=cut
sub get_size {
@@ -136,4 +219,11 @@
return $self->{'size'};
}
+=head1
+
+get_age
+
+ returns the age of the current file
+
+=cut
sub get_age {
@@ -141,4 +231,11 @@
return $self->{'age'};
}
+=head1
+
+upload
+
+ uploads ( receives ) a file from the user
+
+=cut
sub upload {
@@ -169,4 +266,11 @@
);
}
+=head1
+
+download
+
+ downloads ( sends ) the file to the user
+
+=cut
sub download {
@@ -191,4 +295,11 @@
close FILE;
}
+=head1
+
+exists
+
+ returns 1 if the file exists, 0 if it does not
+
+=cut
sub exists {
@@ -217,4 +328,11 @@
return $return;
}
+=head1
+
+create_file
+
+ creates ( touches ) an empty file with the current filename
+
+=cut
sub create_file {
@@ -235,4 +353,11 @@
return $return;
}
+=head1
+
+create_folder
+
+ creates (mkdir) a new folder
+
+=cut
sub create_folder {
@@ -252,4 +377,11 @@
}
+=head1
+
+delete
+
+ deletes ( rm ) the current file
+
+=cut
sub delete {
my $self = shift;
@@ -274,4 +406,11 @@
}
}
+=head1
+
+delete_folder
+
+ deletes ( rm -rf ) the current folder
+
+=cut
sub delete_folder {
@@ -295,4 +434,11 @@
return 1;
}
+=head1
+
+copy
+
+ copy ( cp ) the current file/folder
+
+=cut
sub copy {
@@ -322,4 +468,11 @@
return 1;
}
+=head1
+
+rename
+
+ renames ( mv ) the current file
+
+=cut
sub rename {
@@ -340,4 +493,11 @@
return 1;
}
+=head1
+
+file_read
+
+ reads the contents of the current file
+
+=cut
sub file_read {
@@ -351,4 +511,11 @@
);
}
+=head1
+
+file_write
+
+ writes contents out to file
+
+=cut
sub file_write {
@@ -370,4 +537,11 @@
return 1;
}
+=head1
+
+get_file_commands
+
+ returns the supported file commands
+
+=cut
sub get_file_commands {
|