Break out the Java 6 executable support from GitIndex for reuse
[egit/fonseca.git] / org.spearce.jgit / src / org / spearce / jgit / util / FS_Win32.java
blob785a9248544a31a99b1cd4f3d7a13d90e69fd667
1 /*
2 * Copyright (C) 2008 Shawn Pearce <spearce@spearce.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License, version 2, as published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
17 package org.spearce.jgit.util;
19 import java.io.File;
20 import java.security.AccessController;
21 import java.security.PrivilegedAction;
23 class FS_Win32 extends FS {
24 static boolean detect() {
25 final String osDotName = AccessController
26 .doPrivileged(new PrivilegedAction<String>() {
27 public String run() {
28 return System.getProperty("os.name");
30 });
31 return osDotName != null
32 && osDotName.toLowerCase().indexOf("windows") != -1;
35 public boolean supportsExecute() {
36 return false;
39 public boolean canExecute(final File f) {
40 return false;
43 public boolean setExecute(final File f, final boolean canExec) {
44 return false;