Date: Thu, 1 Aug 2002 11:00:21 -0500 From: vcardon <vcardon@siue.edu> To: MET <met@uberstats.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Slightly off topic - C++ Message-ID: <20020801160021.GD1132@spastic.siue.edu> In-Reply-To: <001001c23970$dae6e2c0$6901a8c0@SURVIVAL> References: <001001c23970$dae6e2c0$6901a8c0@SURVIVAL>
next in thread | previous in thread | raw e-mail | index | archive | help
--xB0nW4MQa6jZONgY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 01, 2002 at 11:33:50AM -0400, MET wrote: > Anybody know where I might find a good tutorial or something on > directory/file browsing in C++. I'm trying to write a program that > backs up MySQL databases, quite a few, and keeps track of them by not > letting the backups exceed a certain number. Naturally this would be > done by deleting files that are X amount of days/weeks old. However, to > do this I need to be able to scan all the files in a specific directory > and then obtain information on when they were created/modified. > =20 > I know there are Perl programs that do this, but I'd rather do it myself > ~ its a learning experience. You can use the MySQL++ C++ API to create the backups. Then you will need to use some UNIX system calls in order to check the modification times on directories and files. As far as tutorials are concerned, there is a tutorial for MYSQL++ in the documentation section of the MySQL site. I am not aware of any good tutorials for UNIX system calls, but I am sure a google search would turn something up. If you have access to it, I highly recommend _Advanced_Programming_in_the_UNIX_Environment_ by W. Richard Stevens. I hope that helps. Victor --xB0nW4MQa6jZONgY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9SVsVZU/bSegbOhwRAtE1AJ0VDj6nLmPc2oOwN3GytMSwiT2ELwCgpZMa nGVEp3gTpI4ws4boHW6iNx8= =gHYR -----END PGP SIGNATURE----- --xB0nW4MQa6jZONgY-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020801160021.GD1132>