From: Rob H. <for...@us...> - 2002-10-19 05:05:14
|
Update of /cvsroot/sandweb/sandweb/doc/API/File In directory usw-pr-cvs1:/tmp/cvs-serv2708 Modified Files: Unix.txt Log Message: Copied File over File/Unix, it's basically the same thing. I need to bring them both up to date anyway though, there are a couple differences. Index: Unix.txt =================================================================== RCS file: /cvsroot/sandweb/sandweb/doc/API/File/Unix.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- Unix.txt 17 Oct 2002 07:30:47 -0000 1.1 +++ Unix.txt 19 Oct 2002 05:05:11 -0000 1.2 @@ -4,47 +4,35 @@ # It is only intended to be called by the File class. -------------------------------------------------------------------------------- - METHOD - new + new SYNOPSIS + my $file = SandWeb::File->new( + location => $location; + filename => $filename; + ); + DESCRIPTION + This method is a constructor. It needs to know the location of the + file as well as the name of the file. PARAMETERS - parameter (type: string) (required) + location (type: string) (required) - Default: none. + This contains the full ( absolute or relative ) path + to the file, as far as the file system is concerned. -RETURN CODES + Default: none. - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -get_owner --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS + filename (type: string) (required) + + This contains the full name of the file, as far as the + file system is concerned. - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. + Default: none. RETURN CODES @@ -58,21 +46,20 @@ read the files specified, or they did not exist. -get_group -------------------------------------------------------------------------------- METHOD - methodname + get_owner SYNOPSIS + my $owner = $file->get_owner(); DESCRIPTION + Returns the UID of the owner of the file. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -86,21 +73,20 @@ read the files specified, or they did not exist. -get_filename -------------------------------------------------------------------------------- METHOD - methodname + get_group SYNOPSIS + my $group = $file->get_group(); DESCRIPTION + Returns the GID of the group membership of the file. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -114,21 +100,20 @@ read the files specified, or they did not exist. -get_location -------------------------------------------------------------------------------- METHOD - methodname + get_filename SYNOPSIS + my $filename = $file->get_filename(); DESCRIPTION + Returns the full name of the file. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -142,21 +127,21 @@ read the files specified, or they did not exist. -get_permissions -------------------------------------------------------------------------------- METHOD - methodname + get_location SYNOPSIS + my $location = $file->get_location(); DESCRIPTION + Returns the full ( absolute or relative ) path + to the file. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -170,21 +155,21 @@ read the files specified, or they did not exist. -get_file_type -------------------------------------------------------------------------------- METHOD - methodname + get_permissions SYNOPSIS + my $permissions = $file->get_permissions(); DESCRIPTION + Returns the current file system permissions, + as an octal value. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -198,21 +183,22 @@ read the files specified, or they did not exist. -get_size -------------------------------------------------------------------------------- METHOD - methodname + get_file_type SYNOPSIS + my $file_type = $file->get_file_type(); DESCRIPTION + Returns Perl's guess as to what type of file + this is. Type returned one of : Binary, Text, + Directory or Unknown. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -226,21 +212,20 @@ read the files specified, or they did not exist. -get_age -------------------------------------------------------------------------------- METHOD - methodname + get_size SYNOPSIS + my $file_size = $file->get_size(); DESCRIPTION + Returns the size of the file, in bytes. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -254,21 +239,21 @@ read the files specified, or they did not exist. -upload -------------------------------------------------------------------------------- METHOD - methodname + get_age SYNOPSIS + my $age = $file->get_age(); DESCRIPTION + Returns the date of the last modification to this + file, in local time ( day month date time year ). PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -282,21 +267,20 @@ read the files specified, or they did not exist. -download -------------------------------------------------------------------------------- METHOD - methodname + create_file SYNOPSIS + my $return = $file->create_file(); DESCRIPTION + Creates a file, using the filename passed to the constructor. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -310,21 +294,21 @@ read the files specified, or they did not exist. -exists -------------------------------------------------------------------------------- METHOD - methodname + create_folder SYNOPSIS + my $return = $file->create_folder(); DESCRIPTION + Creates a folder ( also known as a directory ) using the + filename passed to the constructor. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -338,21 +322,21 @@ read the files specified, or they did not exist. -create_file -------------------------------------------------------------------------------- METHOD - methodname + copy SYNOPSIS + my $return = $file->copy( tofile => "alternate_name.c" ); DESCRIPTION + Creates an exact copy of the file. PARAMETERS - parameter (type: string) (required) - - Default: none. + tocopy (type: string) (required) + Contains the full path and filename of the copy. RETURN CODES @@ -366,21 +350,22 @@ read the files specified, or they did not exist. -create_folder -------------------------------------------------------------------------------- METHOD - methodname + rename SYNOPSIS + my $return = $file->rename( tofile => "alternate_name.c" ); DESCRIPTION + Renames an existing file. This is the same thing as a move, + as far as the file system and operating system are concerned. PARAMETERS - parameter (type: string) (required) - - Default: none. + tocopy (type: string) (required) + Contains the full path and filename of the new file. RETURN CODES @@ -394,21 +379,20 @@ read the files specified, or they did not exist. -delete -------------------------------------------------------------------------------- METHOD - methodname + remove_file SYNOPSIS + my $return = $file->remove_file(); DESCRIPTION + Removes the file specified in the constructor. PARAMETERS - parameter (type: string) (required) - - Default: none. + none. RETURN CODES @@ -422,21 +406,20 @@ read the files specified, or they did not exist. -delete_folder -------------------------------------------------------------------------------- METHOD - methodname + remove_folder SYNOPSIS + my $return = $file->remove_folder(); DESCRIPTION + Removes the folder specified in the constructor. PARAMETERS - parameter (type: string) (required) - - Default: none. + none. RETURN CODES @@ -449,227 +432,2 @@ -1 = This return value means that there was not sufficient permision to read the files specified, or they did not exist. - -copy --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -rename --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -file_read --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -file_write --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -get_file_commands --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_do_file_write --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_do_file_read --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_shell --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - |