comparison src/org/tmatesoft/hg/util/FileIterator.java @ 413:7f27122011c3

Support and respect for symbolic links and executable flag, with /bin/ls backed implementation to discover these
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 21 Mar 2012 20:40:28 +0100
parents 33eaed1ad130
children b3b1db9301a2
comparison
equal deleted inserted replaced
406:d56ea1a2537a 413:7f27122011c3
1 /* 1 /*
2 * Copyright (c) 2011 TMate Software Ltd 2 * Copyright (c) 2011-2012 TMate Software Ltd
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License. 6 * the Free Software Foundation; version 2 of the License.
7 * 7 *
61 * are always considered as representing the fraction, nonetheless, {@link FileIterator} shall return true for such names if 61 * are always considered as representing the fraction, nonetheless, {@link FileIterator} shall return true for such names if
62 * asked. 62 * asked.
63 * @return <code>true</code> if this {@link FileIterator} is responsible for (interested in) specified repository-local path 63 * @return <code>true</code> if this {@link FileIterator} is responsible for (interested in) specified repository-local path
64 */ 64 */
65 @Experimental(reason="Perhaps, shall not be part of FileIterator, but rather separate Path.Matcher. Approaches in regular StatusCollector (doesn't use FI, but supports scope) and WC collector to look similar, and for HgStatusCommand to use single approach to set the scope") 65 @Experimental(reason="Perhaps, shall not be part of FileIterator, but rather separate Path.Matcher. Approaches in regular StatusCollector (doesn't use FI, but supports scope) and WC collector to look similar, and for HgStatusCommand to use single approach to set the scope")
66 boolean inScope(Path file); 66 boolean inScope(Path file); // PathMatcher scope()
67
68 /**
69 * Tells whether caller shall be aware of distinction between executable and non-executable files coming from this iterator.
70 * Note, these days Mercurial (as of 2.1) doesn't recognize Windows .exe files as executable (nor it treats any Windows filesystem as exec-capable)
71 * @return <code>true</code> if file descriptors are capable to provide executable flag
72 */
73 boolean supportsExecFlag();
74
75 /**
76 * POSIX file systems allow symbolic links to files, and these links are handled in a special way with Mercurial, i.e. it tracks value of
77 * the link, not its actual target.
78 * Note, these days Mercurial (as of 2.1) doesn't support Windows Vista/7 symlinks.
79 * @return <code>true</code> if file descriptors are capable to tell symlink files from regular ones.
80 */
81 boolean supportsLinkFlag();
67 } 82 }