php manual at www.php.net has a list of file functions along with examples.
And for the future - in order not to clutter the forum. If you have a question - do research yourself, and if you can't find an answer on your own -> then post.
Di
www.tftw.org