appletfilerename.c

Go to the documentation of this file.
00001 
00002 /*  $Id: appletfilerename.c 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /* copyright 1991-96 UserLand Software, Inc. All Rights Reserved.*/
00005 
00006 
00007 #include "applet.h"
00008 #include "appletfilesinternal.h"
00009 #include "appletfilemodified.h"
00010 #include "appletfilerename.h"
00011 
00012 
00013 boolean filerename (ptrfilespec pfs, bigstring newname) {
00014     
00015     /*
00016     dmb 9/21/93: don't set the file's mod date, just touch the parent 
00017     folder (and return true even if that part fails).
00018     */
00019     
00020     OSErr ec;
00021     
00022     ec = FSpRename (pfs, newname);
00023     
00024     if (fileerror (pfs, ec)) 
00025         return (false);
00026     
00027     copystring (newname, (*pfs).name); /*stamp the renamed file's folder with the current time*/
00028     
00029     filetouchparentfolder (pfs);
00030     
00031     return (true);
00032     } /*filerename*/
00033 
00034 

Generated on Wed May 31 18:19:41 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6