[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directo
From: |
Ludovic Courtès |
Subject: |
Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories |
Date: |
Wed, 13 Sep 2006 13:50:24 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hi Andy,
"Andy Tai" <address@hidden> writes:
> In light of the previous comments in this thread, would Ludovic mind to
> modify the patch so it only creates an archive in an empty directory... or I
> will modify it to make tla to create the archive only if the preexisting
> directory is empty.
The issue is that this is not easily implementable. The
`arch_pfs_vtable' doesn't have an `is_empty_directory ()' (or similar)
call, and using the `directory_files ()' call would yield too much
overhead (I'm guessing that this returns the list of files contained in
a directory).
On Unix-like file systems, checking whether a directory is empty can be
done efficiently by looking at the `st_nlink' field of `struct stat'.
However, I'm not sure similar features can be used over SFTP, HTTP,
etc.
Thus, I think we should just forget about this patch.
Thanks,
Ludovic.
- [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Ludovic Courtès, 2006/09/12
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Thomas Lord, 2006/09/12
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Ludovic Courtès, 2006/09/12
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Thomas Lord, 2006/09/12
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Sylvain Beucler, 2006/09/12
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Thomas Lord, 2006/09/12
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Andy Tai, 2006/09/13
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories,
Ludovic Courtès <=
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Andy Tai, 2006/09/13
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Thomas Lord, 2006/09/13
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Ludovic Courtès, 2006/09/13
- Re: [Gnu-arch-users] [MERGE-REQUEST] `make-archive' and existing directories, Thomas Lord, 2006/09/13