Hi Andy,

"Andy Tai" <[EMAIL PROTECTED]> 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 mailing list
Gnu-arch-users@gnu.org
http://lists.gnu.org/mailman/listinfo/gnu-arch-users

GNU arch home page:
http://savannah.gnu.org/projects/gnu-arch/

Reply via email to