SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 479 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"


The copy() method copies a file to a new location. The method accepts three
parameters: the path to the source file, the path to the destination file, and an
optional base path. If a base path is provided, it will be prepended to the source and
destination paths.
The copy() method returns a Boolean response. This example copies the foo.php
file to the bar.php file in the frontend root of the current component:
if (!JFile::copy('foo.php', 'bar.php', JPATH_COMPONENT))
{
// handle failed file copy
}
The move() method works in the same way, except that it relocates the file rather
than creating a copy of the file. This method returns a Boolean response. This
example moves the file foo.php to the file bar.php in the frontend root of the
current component:
if (!JFile::move('foo.php', 'bar.php', JPATH_COMPONENT))
{
// handle failed file move
}
Chapter 12
[ 353 ]
The last of these management-type methods we'll look at is the delete() method.
This method removes one or more files from the file system.


Pages:
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6