On Tue, 16 May 2006 16:20:10 -0700
Tyler MacDonald <[EMAIL PROTECTED]> wrote:
> I'm getting this output:
>
> APR: file is 0 bytes
> stat: file is 21296 bytes
>
> From this code:
>
> bzero(&finfo, sizeof(finfo));
> bzero(&sinfo, sizeof(sinfo));
>
> if((rv = apr_stat(&finfo, path, APR_FINFO_NORM, p)) != APR_SUCCESS) {
> fprintf(stderr, "Failed to retrieve file information for %s\n", path);
> return NULL;
> }
>
> printf("APR: file is %lu bytes\n", finfo.size);
>
> stat(path, &sinfo);
>
> printf("stat: file is %llu bytes\n", sinfo.st_size);
>
>
> Even if I change APR_FINFO_NORM to APR_FINFO_SIZE, or even open the file
> first and use apr_file_info_get, APR always returns "size" as zero. Does
> anybody know what could cause this?
>
Platform (win32/linux/..) ?
--
Davi Arnaut