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
;
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
>() {
28 return System
.getProperty("os.name");
31 return osDotName
!= null
32 && osDotName
.toLowerCase().indexOf("windows") != -1;
35 public boolean supportsExecute() {
39 public boolean canExecute(final File f
) {
43 public boolean setExecute(final File f
, final boolean canExec
) {