/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
class WindowsFileSystem
extends FileSystem
{
// default directory (is absolute), and default root
private final boolean supportsLinks;
private final boolean supportsStreamEnumeration;
// package-private
{
// parse default directory and check it is absolute
throw new AssertionError("Default directory is not an absolute path");
// symbolic links available on Vista and newer
// enumeration of data streams available on Windows Server 2003 and newer
}
// package-private
return defaultDirectory;
}
return defaultRoot;
}
boolean supportsLinks() {
return supportsLinks;
}
boolean supportsStreamEnumeration() {
return supportsStreamEnumeration;
}
return provider;
}
return "\\";
}
public boolean isOpen() {
return true;
}
public boolean isReadOnly() {
return false;
}
throw new UnsupportedOperationException();
}
int drives = 0;
try {
} catch (WindowsException x) {
// shouldn't happen
throw new AssertionError(x.getMessage());
}
// iterate over roots, ignoring those that the security manager denies
for (int i = 0; i <= 25; i++) { // 0->A, 1->B, 2->C...
try {
} catch (SecurityException x) {
continue;
}
}
}
}
}
/**
* Iterator returned by getFileStores method.
*/
}
for (;;) {
return null;
// ignore if security manager denies access
try {
} catch (SecurityException x) {
continue;
}
try {
return fs;
} catch (IOException ioe) {
// skip it
}
}
}
public synchronized boolean hasNext() {
return true;
}
throw new NoSuchElementException();
} else {
return result;
}
}
public void remove() {
throw new UnsupportedOperationException();
}
}
try {
} catch (SecurityException se) {
return Collections.emptyList();
}
}
return new FileStoreIterator();
}
};
}
// supported views
return supportedFileAttributeViews;
}
} else {
}
}
}
}
return LookupService.instance;
}
private static class LookupService {
new UserPrincipalLookupService() {
throws IOException
{
}
throws IOException
{
if (!(user instanceof GroupPrincipal))
throw new UserPrincipalNotFoundException(group);
return (GroupPrincipal)user;
}
};
}
throw new IllegalArgumentException();
} else {
} else {
"' not recognized");
}
}
// match in unicode_case_insensitive
// return matcher
return new PathMatcher() {
}
};
}
throws IOException
{
return new WindowsWatchService(this);
}
}