1 /**
2 This file is part of GoldenGate Project (named also GoldenGate or GG).
3
4 Copyright 2009, Frederic Bregier, and individual contributors by the @author
5 tags. See the COPYRIGHT.txt in the distribution for a full listing of
6 individual contributors.
7
8 All GoldenGate Project is free software: you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as published
10 by the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 GoldenGate is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GoldenGate . If not, see <http://www.gnu.org/licenses/>.
20 */
21 package goldengate.common.file.filesystembased.specific;
22
23 import java.io.File;
24
25 /**
26 * Abstract class to allow specific function depending on the underlying JDK to
27 * used.
28 *
29 * @author Frederic Bregier
30 *
31 */
32 public abstract class FilesystemBasedDirJdkAbstract {
33 /**
34 * Should the Ftp Server use the Apache Commons Io or not: if not wildcard
35 * and freespace (ALLO) will not be supported.
36 */
37 public static boolean ueApacheCommonsIo = true;
38
39 /**
40 *
41 * @param directory
42 * @return the free space of the given Directory
43 */
44 public abstract long getFreeSpace(File directory);
45
46 /**
47 * Result of ls on FileInterface
48 *
49 * @param file
50 * @return True if the file is executable
51 */
52 public abstract boolean canExecute(File file);
53 }