Home » openjdk-7 » java » io » [javadoc | source]

    1   /*
    2    * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
    3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    4    *
    5    * This code is free software; you can redistribute it and/or modify it
    6    * under the terms of the GNU General Public License version 2 only, as
    7    * published by the Free Software Foundation.  Oracle designates this
    8    * particular file as subject to the "Classpath" exception as provided
    9    * by Oracle in the LICENSE file that accompanied this code.
   10    *
   11    * This code is distributed in the hope that it will be useful, but WITHOUT
   12    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   13    * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   14    * version 2 for more details (a copy is included in the LICENSE file that
   15    * accompanied this code).
   16    *
   17    * You should have received a copy of the GNU General Public License version
   18    * 2 along with this work; if not, write to the Free Software Foundation,
   19    * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   20    *
   21    * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   22    * or visit www.oracle.com if you need additional information or have any
   23    * questions.
   24    */
   25   
   26   /*
   27    */
   28   
   29   package java.io;
   30   
   31   /**
   32    * Unicode-aware FileSystem for Windows NT/2000.
   33    *
   34    * @author Konstantin Kladko
   35    * @since 1.4
   36    */
   37   class WinNTFileSystem extends Win32FileSystem {
   38   
   39       protected native String canonicalize0(String path)
   40                                                   throws IOException;
   41       protected native String canonicalizeWithPrefix0(String canonicalPrefix,
   42                                                       String pathWithCanonicalPrefix)
   43                                                   throws IOException;
   44   
   45       /* -- Attribute accessors -- */
   46   
   47       public native int getBooleanAttributes(File f);
   48       public native boolean checkAccess(File f, int access);
   49       public native long getLastModifiedTime(File f);
   50       public native long getLength(File f);
   51       public native boolean setPermission(File f, int access, boolean enable, boolean owneronly);
   52   
   53   
   54       public long getSpace(File f, int t) {
   55           if (f.exists()) {
   56               return getSpace0(f, t);
   57           }
   58           return 0;
   59       }
   60   
   61       private native long getSpace0(File f, int t);
   62   
   63       /* -- File operations -- */
   64   
   65       public native boolean createFileExclusively(String path)
   66                                                  throws IOException;
   67       protected native boolean delete0(File f);
   68       public native String[] list(File f);
   69       public native boolean createDirectory(File f);
   70       protected native boolean rename0(File f1, File f2);
   71       public native boolean setLastModifiedTime(File f, long time);
   72       public native boolean setReadOnly(File f);
   73       protected native String getDriveDirectory(int drive);
   74       private static native void initIDs();
   75   
   76       static {
   77               initIDs();
   78       }
   79   }

Home » openjdk-7 » java » io » [javadoc | source]