5389N/A/*
5389N/A * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
5389N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5389N/A *
5389N/A * This code is free software; you can redistribute it and/or modify it
5389N/A * under the terms of the GNU General Public License version 2 only, as
5389N/A * published by the Free Software Foundation. Oracle designates this
5389N/A * particular file as subject to the "Classpath" exception as provided
5389N/A * by Oracle in the LICENSE file that accompanied this code.
5389N/A *
5389N/A * This code is distributed in the hope that it will be useful, but WITHOUT
5389N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5389N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5389N/A * version 2 for more details (a copy is included in the LICENSE file that
5389N/A * accompanied this code).
5389N/A *
5389N/A * You should have received a copy of the GNU General Public License version
5389N/A * 2 along with this work; if not, write to the Free Software Foundation,
5389N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5389N/A *
5389N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5389N/A * or visit www.oracle.com if you need additional information or have any
5389N/A * questions.
5389N/A */
5389N/A
5389N/Apackage sun.nio.fs;
5389N/A
5389N/Aimport java.nio.file.*;
5389N/Aimport java.io.IOException;
5389N/Aimport java.util.*;
5389N/Aimport java.util.regex.Pattern;
5389N/Aimport java.security.AccessController;
5389N/Aimport sun.security.action.GetPropertyAction;
5389N/A
5389N/Aimport static sun.nio.fs.MacOSXNativeDispatcher.*;
5389N/A
5389N/A/**
5389N/A * MacOS implementation of FileSystem
5389N/A */
5389N/A
5389N/Aclass MacOSXFileSystem extends BsdFileSystem {
5389N/A
5389N/A MacOSXFileSystem(UnixFileSystemProvider provider, String dir) {
5389N/A super(provider, dir);
5389N/A }
5389N/A
5389N/A // match in unicode canon_eq
5389N/A Pattern compilePathMatchPattern(String expr) {
5389N/A return Pattern.compile(expr, Pattern.CANON_EQ) ;
5389N/A }
5389N/A
5389N/A char[] normalizeNativePath(char[] path) {
5389N/A for (char c : path) {
5389N/A if (c > 0x80)
5389N/A return normalizepath(path, kCFStringNormalizationFormD);
5389N/A }
5389N/A return path;
5389N/A }
5389N/A
5389N/A String normalizeJavaPath(String path) {
5389N/A for (int i = 0; i < path.length(); i++) {
5389N/A if (path.charAt(i) > 0x80)
5389N/A return new String(normalizepath(path.toCharArray(),
5389N/A kCFStringNormalizationFormC));
5389N/A }
5389N/A return path;
5389N/A }
5389N/A
5389N/A}