Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Sep 7 14:42:24 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 m87LgNMu011997 for ; Sun, 7 Sep 2008 14:42:24 -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 m87LfDOq019187 for ; Sun, 7 Sep 2008 14:41:13 -0700 Message-Id: <200809072141.m87LfDOq019187@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Error with FileSize Date: Sun, 07 Sep 2008 14:41:13 -0700 From: Bill Cheng 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