comparison src/org/tmatesoft/hg/util/FileInfo.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 ed6b74a58c66
children
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 *
45 /** 45 /**
46 * Access file contents. Caller is responsible to close the channel. 46 * Access file contents. Caller is responsible to close the channel.
47 * @return file reader object, never <code>null</code> 47 * @return file reader object, never <code>null</code>
48 */ 48 */
49 ReadableByteChannel newInputChannel(); 49 ReadableByteChannel newInputChannel();
50
51 /**
52 * This method is invoked only if source FileIterator tells <code>true</code> for {@link FileIterator#supportsExecFlag()}
53 * @return <code>true</code> if this object describes an executable file
54 */
55 boolean isExecutable();
56
57 /**
58 * This method is be invoked only if source FileIterator tells <code>true</code> for {@link FileIterator#supportsLinkFlag()}.
59 * @return <code>true</code> if this file object represents a symbolic link
60 */
61 boolean isSymlink();
50 } 62 }