<?php
my $file2 = $login->directory->file($system->param('new_file'));
$system->error('File name contains invalid characters') if ($system->param('new_file') =~ /[\/]+|^.+$/);
$file2->write($file->read);
$login->user->notice('file_create','copied a file ('.$file->path.' to '.$file2->name.')');
$system->redirect('/manager/files/directory');
?>