--- parser3/src/classes/file.C 2001/10/29 17:49:57 1.63 +++ parser3/src/classes/file.C 2002/06/11 12:20:41 1.82 @@ -1,10 +1,10 @@ /** @file Parser: @b file parser class. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) - $Id: file.C,v 1.63 2001/10/29 17:49:57 paf Exp $ + $Id: file.C,v 1.82 2002/06/11 12:20:41 paf Exp $ */ #include "pa_config_includes.h" @@ -20,13 +20,12 @@ #include "pa_vdate.h" #include "pa_dir.h" #include "pa_vtable.h" +#include "pa_charset.h" // consts // defines -#define FILE_CLASS_NAME "file" - #define TEXT_MODE_NAME "text" // class @@ -60,20 +59,18 @@ static void _save(Request& r, const Stri } static void _delete(Request& r, const String&, MethodParams *params) { - Pool& pool=r.pool(); Value& vfile_name=params->as_no_junction(0, "file name must not be code"); // unlink - file_delete(pool, r.absolute(vfile_name.as_string())); + file_delete(r.absolute(vfile_name.as_string())); } static void _move(Request& r, const String&, MethodParams *params) { - Pool& pool=r.pool(); Value& vfrom_file_name=params->as_no_junction(0, "from file name must not be code"); Value& vto_file_name=params->as_no_junction(1, "to file name must not be code"); // move - file_move(pool, + file_move( r.absolute(vfrom_file_name.as_string()), r.absolute(vto_file_name.as_string())); } @@ -86,18 +83,18 @@ static void _find(Request& r, const Stri // passed file name simply exists in current dir if(file_readable(r.absolute(lfile_name))) { - r.write_no_lang(*new(pool) VString(lfile_name)); + r.write_no_lang(lfile_name); return; } // scan .. dirs for result for(int i=0; i