For example, you might want to make a backup of some files first. From there, we get the file 'grep' which is contained inside the bin directory. If this file does not exist, an error will occur during the installation. Next, we get the 'main' folder, again from the file system root. Finally, we call the File.copy function which copies the source file to the destination.
Functions also exist to move, rename and execute files.
Thus, you can move files that might conflict with your package out of the way. Handling Errors You will likely want to handle errors gracefully. This will occur if a file or directory cannot be found, there is insufficient disk space or for a number of other reasons. You can use the getLastError function to determine whether an error occured. If it returns 0, no error occured.