Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 7 18:10:17 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m881AHaw013654 for ; Sun, 7 Sep 2008 18:10:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m88198fF021229 for ; Sun, 7 Sep 2008 18:09:08 -0700 Message-Id: <200809080109.m88198fF021229@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Error with FileSize Date: Sun, 07 Sep 2008 18:09:08 -0700 From: Bill Cheng Someone wrote: > Yea 'm doing stat()Appropriate response means 0xFE12 (in case of error). You need to tell me what you are passing to stat(). Please use the debugger so you know exactly what you are passing to stat() and not what you think you are passing to stat(). -- Bill Cheng // bill.cheng@usc.edu On Sun, Sep 7, 2008 at 2:41 PM, Bill Cheng wrote: > Someone wrote: > > > Hello,When I specify any file that exists on server, it gives me the > file > > size (num of bytes occupied by the file). > > Do you call stat() or something equivalent? > > > If the file doesn't exist, it give appropriate response. > > I'm not sure what "appropriate response" means. It depends > on which API you call. > > > But... If I specify www.Google.com as the name of the file who's size I > want > > to know, The server doesn't give error message (doesn't give FILE NOT > FOUND > > error). > > But it gives FILE SIZE as 0 (ZERO). > > Which server? Your server? > > > Does that mean, Unix considers / is able to detect www.google.com as a > file > > but fails to get the size of the same? > > I don't know how your server work. Does it try to stat() > "/www.Google.com"? If it does, it should get an error. > Actually, it should not prepend "/" in front if it! It > should just try to stat() "www.Google.com" in the current > working directlry. > -- > Bill Cheng // bill.cheng@usc.edu