From: Rob H. <for...@us...> - 2001-11-24 11:09:34
|
Update of /cvsroot/sandweb/sandweb/doc/API In directory usw-pr-cvs1:/tmp/cvs-serv31763/doc/API Modified Files: File.txt Log Message: added methods for : create_file, create_folder, remove_file, remove_folder, rename, copy tested all functions and added documentation. browse_menu UI is going to need some rethinking; there's no way a checked file can get passed right now, since all file operations are HREFs rather than part of an HTML form. I'm going to leave this unhooked from the frontend (browse_menu) for now. I put stubs in place on the frontend; just simple templates. Stubs are good. Index: File.txt =================================================================== RCS file: /cvsroot/sandweb/sandweb/doc/API/File.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -U2 -r1.3 -r1.4 --- File.txt 2001/11/22 08:46:56 1.3 +++ File.txt 2001/11/24 11:09:31 1.4 @@ -265,2 +265,167 @@ read the files specified, or they did not exist. +-------------------------------------------------------------------------------- + +METHOD + create_file + +SYNOPSIS + + my $return = $file->create_file(); + +DESCRIPTION + + Creates a file, using the filename passed to the constructor. + +PARAMETERS + + 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. + +-------------------------------------------------------------------------------- + +METHOD + 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 + + 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. + +-------------------------------------------------------------------------------- + +METHOD + copy + +SYNOPSIS + + my $return = $file->copy( tofile => "alternate_name.c" ); + +DESCRIPTION + + Creates an exact copy of the file. + +PARAMETERS + + tocopy (type: string) (required) + Contains the full path and filename of the copy. + +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. + +-------------------------------------------------------------------------------- + +METHOD + 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 + + tocopy (type: string) (required) + Contains the full path and filename of the new file. + +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. + +-------------------------------------------------------------------------------- + +METHOD + remove_file + +SYNOPSIS + + my $return = $file->remove_file(); + +DESCRIPTION + + Removes the file specified in the constructor. + +PARAMETERS + + 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. + +-------------------------------------------------------------------------------- + +METHOD + remove_folder + +SYNOPSIS + + my $return = $file->remove_folder(); + +DESCRIPTION + + Removes the folder specified in the constructor. + +PARAMETERS + + 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. |