Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 26 May 2003 11:26:22 -0400 From: Peter Davis To: Igor Pechtchanski Cc: cygwin AT cygwin DOT com Subject: Re: Behavior of stat() changed from NT to Win2000/XP Message-ID: <20030526152622.GL4032@bitstream.com> References: <20030526135811 DOT GK4032 AT bitstream DOT com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KDt/GgjP6HVcx58l" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i --KDt/GgjP6HVcx58l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 26, 2003 at 10:03:33AM -0400, Igor Pechtchanski wrote: > On Mon, 26 May 2003, Peter Davis wrote: > > > [snip] > > Attached is a very simple program called stat, that just calls the > > stat() function and displays the results. It's called like this: > > [snip] > > Peter, FYI, there was no attachment in that message. > Igor Oops! Here it is. -pd -- -------- Peter Davis Funny stuff at http://www.pfdstudio.com List of resources for children's writers and illustrators at: http://www.pfdstudio.com/cwrl.html --KDt/GgjP6HVcx58l Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="stat.c" /* Stat a file */ #include int main (int argc, char **argv) { struct stat filestat; stat (argv[1], &filestat); printf("st_dev: %d\n", filestat.st_dev); printf("st_ino: %d\n", filestat.st_ino); printf("st_mode: %d\n", filestat.st_mode); printf("st_nlink: %d\n", filestat.st_nlink); printf("st_uid: %d\n", filestat.st_uid); printf("st_gid: %d\n", filestat.st_gid); printf("st_rdev: %d\n", filestat.st_rdev); printf("st_size: %d\n", filestat.st_size); printf("st_atime: %d\n", filestat.st_atime); printf("st_mtime: %d\n", filestat.st_mtime); printf("st_ctime: %d\n", filestat.st_ctime); printf("st_blksize: %d\n", filestat.st_blksize); printf("st_blocks: %d\n\n", filestat.st_blocks); } --KDt/GgjP6HVcx58l Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --KDt/GgjP6HVcx58l--