[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p
From: |
jemarch |
Subject: |
Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p |
Date: |
Mon, 28 Jul 2008 01:36:42 +0200 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
Hello Zac.
Attached is the merge directive for pdf_fsys_disk_item_p.
+ file = fopen ((char*)ascii_path, "r");
+ if (file == NULL)
+ {
+ goto error_cleanup;
+ }
Note that such a call to fopen will fail if the file is not readable,
but still exists in the filesystem. Also, it will work for directories
in POSIX systems but, will it work in windows systems?
This function should also work for files for which the client doesnt
have read perms.
I would suggest to use 'stat' or 'lstat' to do this (those functions
has support for directories, special files, etc). AFAIK mingw has
support for the stat function and anyway we have the sys_stat.h
portability file from gnulib already installed in libgnupdf.
Now there are also the msdos-like "device" filenames such as PRN or
LPT8. For those files the item_p function should always return
PDF_TRUE. You can use the already implemented
'pdf_fsys_disk_win32_device_p' function to seek if a given filename is
a msdos special file.
- [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p, Zac Brown, 2008/07/27
- Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p, Zac Brown, 2008/07/27
- Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p,
jemarch <=
- Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p, Zac Brown, 2008/07/27
- Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p, Aleksander Morgado, 2008/07/28
- Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p, Zac Brown, 2008/07/28
- Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p, Zac Brown, 2008/07/28
- Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p, jemarch, 2008/07/28
- Re: [pdf-devel] [PATCH] Add implementation of pdf_fsys_disk_item_p, jemarch, 2008/07/28