Revert "Initial changes for Linux support" This reverts commit 029fbc30248fe7335501f7956b25cfdc038129e5. The above commit appears to have broke our CB.
diff --git a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java index f00d3a9..60343f9 100644 --- a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java +++ b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java
@@ -179,15 +179,12 @@ private FileTimeFilter lastAccessTimeFilter; public FsAdaptor() { - String osName = System.getProperty("os.name"); - if (osName.startsWith("Windows")) { + // At the moment, we only support Windows. + if (System.getProperty("os.name").startsWith("Windows")) { delegate = new WindowsFileDelegate(); - } else if (osName.startsWith("Linux")) { - delegate = new LinuxFileDelegate(); } else { throw new IllegalStateException( - "This is a non-supported platform. The Connector for File Systems" - + " only supports the Windows and Linux platforms."); + "Windows is the only supported platform."); } } @@ -262,11 +259,7 @@ " is not a supported DFS path. Only DFS links of the format " + "\\\\host\\namespace\\link are supported."); } - // TODO: Skip the "is root" check on Linux for now. We need to determine - // an approach at verifying that the src path is the mount point of the - // UNC path and that the UNC path is a root UNC (i.e. of the form - // \\host\share). - } else if (System.getProperty("os.name").startsWith("Windows")) { + } else { if (!rootPath.equals(rootPath.getRoot())) { // We currently only support a config path that is a root. // Non-root paths will fail to produce Acls for all the folders up
diff --git a/src/com/google/enterprise/adaptor/fs/LinuxFileDelegate.java b/src/com/google/enterprise/adaptor/fs/LinuxFileDelegate.java deleted file mode 100644 index b889c1d..0000000 --- a/src/com/google/enterprise/adaptor/fs/LinuxFileDelegate.java +++ /dev/null
@@ -1,75 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package com.google.enterprise.adaptor.fs; - -import com.google.enterprise.adaptor.AsyncDocIdPusher; -import com.google.enterprise.adaptor.DocId; - -import java.io.IOException; -import java.nio.file.attribute.AclEntry; -import java.nio.file.attribute.AclFileAttributeView; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Collections; -import java.util.logging.Level; -import java.util.logging.Logger; - -class LinuxFileDelegate extends NioFileDelegate { - private static final Logger log - = Logger.getLogger(LinuxFileDelegate.class.getName()); - - @Override - public AclFileAttributeViews getAclViews(Path doc) throws IOException { - // TODO(mifern): Add Acl support. - return new AclFileAttributeViews( - new SimpleAclFileAttributeView(Collections.<AclEntry>emptyList()), - new SimpleAclFileAttributeView(Collections.<AclEntry>emptyList())); - } - - @Override - public AclFileAttributeView getShareAclView(Path doc) throws IOException { - // TODO(mifern): Add share Acl support. - return new SimpleAclFileAttributeView(Collections.<AclEntry>emptyList()); - } - - @Override - public AclFileAttributeView getDfsShareAclView(Path doc) { - // TODO(mifern): Add DFS support. - return new SimpleAclFileAttributeView(Collections.<AclEntry>emptyList()); - } - - @Override - public Path getDfsUncActiveStorageUnc(Path doc) throws IOException { - // TODO(mifern): Add DFS support. - return null; - } - - @Override - public void startMonitorPath(Path watchPath, AsyncDocIdPusher pusher) - throws IOException { - // TODO(mifern): Start monitoring. - } - - @Override - public void stopMonitorPath() { - // TODO(mifern): Not sure what monitoring we will have but we need - // to stop it. - } - - @Override - public void destroy() { - // TODO(mifern): Destroy any resrouces created for monitoring. - } -}