|
From: <fd...@us...> - 2007-06-30 11:50:31
|
Revision: 3334
http://jnode.svn.sourceforge.net/jnode/?rev=3334&view=rev
Author: fduminy
Date: 2007-06-30 04:50:26 -0700 (Sat, 30 Jun 2007)
Log Message:
-----------
integration of OpenJDK: added binding with VM for new File APIs (jdk 1.6)
Modified Paths:
--------------
trunk/core/src/classpath/vm/java/io/VMFile.java
trunk/core/src/classpath/vm/java/io/VMFileSystemAPI.java
trunk/core/src/core/org/jnode/util/FileUtils.java
Added Paths:
-----------
trunk/core/src/openjdk/java/java/io/DeleteOnExitHook.java
trunk/core/src/openjdk/java/java/io/FileSystem.java
trunk/core/src/openjdk/vm/java/io/JNodeFileSystem.java
trunk/core/src/openjdk/vm/java/io/NativeFileSystem.java
Modified: trunk/core/src/classpath/vm/java/io/VMFile.java
===================================================================
--- trunk/core/src/classpath/vm/java/io/VMFile.java 2007-06-26 18:57:25 UTC (rev 3333)
+++ trunk/core/src/classpath/vm/java/io/VMFile.java 2007-06-30 11:50:26 UTC (rev 3334)
@@ -198,6 +198,41 @@
}
}
+ static synchronized boolean canExecute(String path) {
+ try {
+ return VMIOUtils.getAPI().canExecute(getNormalizedPath(path));
+ } catch (IOException ex) {
+ return false;
+ }
+ }
+
+ public static boolean setReadable(String path, boolean enable,
+ boolean owneronly) {
+ try {
+ return VMIOUtils.getAPI().setReadable(getNormalizedPath(path), enable, owneronly);
+ } catch (IOException ex) {
+ return false;
+ }
+ }
+
+ public static boolean setWritable(String path, boolean enable,
+ boolean owneronly) {
+ try {
+ return VMIOUtils.getAPI().setWritable(getNormalizedPath(path), enable, owneronly);
+ } catch (IOException ex) {
+ return false;
+ }
+ }
+
+ public static boolean setExecutable(String path, boolean enable,
+ boolean owneronly) {
+ try {
+ return VMIOUtils.getAPI().setExecutable(getNormalizedPath(path), enable, owneronly);
+ } catch (IOException ex) {
+ return false;
+ }
+ }
+
/*
* This method does the actual check of whether or not a file is a directory
* or not. It also handle the existence check to eliminate the overhead of a
@@ -307,4 +342,28 @@
}
return path;
}
+
+ public static long getTotalSpace(String path) {
+ try {
+ return VMIOUtils.getAPI().getTotalSpace(getNormalizedPath(path));
+ } catch (IOException ex) {
+ return 0L;
+ }
+ }
+
+ public static long getFreeSpace(String path) {
+ try {
+ return VMIOUtils.getAPI().getFreeSpace(getNormalizedPath(path));
+ } catch (IOException ex) {
+ return 0L;
+ }
+ }
+
+ public static long getUsableSpace(String path) {
+ try {
+ return VMIOUtils.getAPI().getUsableSpace(getNormalizedPath(path));
+ } catch (IOException ex) {
+ return 0L;
+ }
+ }
}
Modified: trunk/core/src/classpath/vm/java/io/VMFileSystemAPI.java
===================================================================
--- trunk/core/src/classpath/vm/java/io/VMFileSystemAPI.java 2007-06-26 18:57:25 UTC (rev 3333)
+++ trunk/core/src/classpath/vm/java/io/VMFileSystemAPI.java 2007-06-30 11:50:26 UTC (rev 3334)
@@ -53,15 +53,17 @@
*
* @param file
*/
- public boolean canRead(String file);
+ public boolean canRead(String file) throws IOException;
/**
* Can the given file be written to?
*
* @param file
*/
- public boolean canWrite(String file);
+ public boolean canWrite(String file) throws IOException;
+ public boolean canExecute(String file) throws IOException;
+
/**
* Gets the length in bytes of the given file or 0 if the file does not exist.
*
@@ -91,6 +93,15 @@
*/
public void setReadOnly(String file) throws IOException;
+ public boolean setReadable(String normalizedPath, boolean enable,
+ boolean owneronly) throws IOException;
+
+ public boolean setWritable(String normalizedPath, boolean enable,
+ boolean owneronly) throws IOException;
+
+ public boolean setExecutable(String normalizedPath, boolean enable,
+ boolean owneronly) throws IOException;
+
/**
* Delete the given file.
*
@@ -136,4 +147,10 @@
* @throws IOException
*/
public boolean mkFile(String file, VMOpenMode mode) throws IOException;
+
+ public long getTotalSpace(String normalizedPath) throws IOException;
+
+ public long getFreeSpace(String normalizedPath) throws IOException;
+
+ public long getUsableSpace(String normalizedPath) throws IOException;
}
Modified: trunk/core/src/core/org/jnode/util/FileUtils.java
===================================================================
--- trunk/core/src/core/org/jnode/util/FileUtils.java 2007-06-26 18:57:25 UTC (rev 3333)
+++ trunk/core/src/core/org/jnode/util/FileUtils.java 2007-06-30 11:50:26 UTC (rev 3334)
@@ -60,17 +60,23 @@
* @throws IOException
*/
public static final void copy(InputStream is, OutputStream os, byte[] buf, boolean close) throws IOException {
- int len;
- if (buf == null) {
- buf = new byte[4096];
+ try
+ {
+ int len;
+ if (buf == null) {
+ buf = new byte[4096];
+ }
+ while ((len = is.read(buf)) > 0) {
+ os.write(buf, 0, len);
+ }
+ os.flush();
}
- while ((len = is.read(buf)) > 0) {
- os.write(buf, 0, len);
+ finally // in any case, we must close the stream if requested
+ {
+ if (close) {
+ is.close();
+ }
}
- os.flush();
- if (close) {
- is.close();
- }
}
/**
Added: trunk/core/src/openjdk/java/java/io/DeleteOnExitHook.java
===================================================================
--- trunk/core/src/openjdk/java/java/io/DeleteOnExitHook.java (rev 0)
+++ trunk/core/src/openjdk/java/java/io/DeleteOnExitHook.java 2007-06-30 11:50:26 UTC (rev 3334)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package java.io;
+
+import java.util.*;
+import java.io.File;
+
+/**
+ * This class holds a set of filenames to be deleted on VM exit through a shutdown hook.
+ * A set is used both to prevent double-insertion of the same file as well as offer
+ * quick removal.
+ */
+
+class DeleteOnExitHook {
+ private static DeleteOnExitHook instance = null;
+
+ private static LinkedHashSet<String> files = new LinkedHashSet<String>();
+
+ static DeleteOnExitHook hook() {
+ if (instance == null)
+ instance = new DeleteOnExitHook();
+
+ return instance;
+ }
+
+ private DeleteOnExitHook() {}
+
+ static synchronized void add(String file) {
+ if(files == null)
+ throw new IllegalStateException("Shutdown in progress");
+
+ files.add(file);
+ }
+
+ void run() {
+ LinkedHashSet<String> theFiles;
+
+ synchronized (DeleteOnExitHook.class) {
+ theFiles = files;
+ files = null;
+ }
+
+ ArrayList<String> toBeDeleted = new ArrayList<String>(theFiles);
+
+ // reverse the list to maintain previous jdk deletion order.
+ // Last in first deleted.
+ Collections.reverse(toBeDeleted);
+ for (String filename : toBeDeleted) {
+ (new File(filename)).delete();
+ }
+ }
+}
+
Added: trunk/core/src/openjdk/java/java/io/FileSystem.java
===================================================================
--- trunk/core/src/openjdk/java/java/io/FileSystem.java (rev 0)
+++ trunk/core/src/openjdk/java/java/io/FileSystem.java 2007-06-30 11:50:26 UTC (rev 3334)
@@ -0,0 +1,252 @@
+/*
+ * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.io;
+
+
+/**
+ * Package-private abstract class for the local filesystem abstraction.
+ */
+
+abstract class FileSystem {
+
+ /**
+ * Return the FileSystem object representing this platform's local
+ * filesystem.
+ */
+ public static native FileSystem getFileSystem();
+
+
+ /* -- Normalization and construction -- */
+
+ /**
+ * Return the local filesystem's name-separator character.
+ */
+ public abstract char getSeparator();
+
+ /**
+ * Return the local filesystem's path-separator character.
+ */
+ public abstract char getPathSeparator();
+
+ /**
+ * Convert the given pathname string to normal form. If the string is
+ * already in normal form then it is simply returned.
+ */
+ public abstract String normalize(String path);
+
+ /**
+ * Compute the length of this pathname string's prefix. The pathname
+ * string must be in normal form.
+ */
+ public abstract int prefixLength(String path);
+
+ /**
+ * Resolve the child pathname string against the parent.
+ * Both strings must be in normal form, and the result
+ * will be in normal form.
+ */
+ public abstract String resolve(String parent, String child);
+
+ /**
+ * Return the parent pathname string to be used when the parent-directory
+ * argument in one of the two-argument File constructors is the empty
+ * pathname.
+ */
+ public abstract String getDefaultParent();
+
+ /**
+ * Post-process the given URI path string if necessary. This is used on
+ * win32, e.g., to transform "/c:/foo" into "c:/foo". The path string
+ * still has slash separators; code in the File class will translate them
+ * after this method returns.
+ */
+ public abstract String fromURIPath(String path);
+
+
+ /* -- Path operations -- */
+
+ /**
+ * Tell whether or not the given abstract pathname is absolute.
+ */
+ public abstract boolean isAbsolute(File f);
+
+ /**
+ * Resolve the given abstract pathname into absolute form. Invoked by the
+ * getAbsolutePath and getCanonicalPath methods in the File class.
+ */
+ public abstract String resolve(File f);
+
+ public abstract String canonicalize(String path) throws IOException;
+
+
+ /* -- Attribute accessors -- */
+
+ /* Constants for simple boolean attributes */
+ public static final int BA_EXISTS = 0x01;
+ public static final int BA_REGULAR = 0x02;
+ public static final int BA_DIRECTORY = 0x04;
+ public static final int BA_HIDDEN = 0x08;
+
+ /**
+ * Return the simple boolean attributes for the file or directory denoted
+ * by the given abstract pathname, or zero if it does not exist or some
+ * other I/O error occurs.
+ */
+ public abstract int getBooleanAttributes(File f);
+
+ public static final int ACCESS_READ = 0x04;
+ public static final int ACCESS_WRITE = 0x02;
+ public static final int ACCESS_EXECUTE = 0x01;
+
+ /**
+ * Check whether the file or directory denoted by the given abstract
+ * pathname may be accessed by this process. The second argument specifies
+ * which access, ACCESS_READ, ACCESS_WRITE or ACCESS_EXECUTE, to check.
+ * Return false if access is denied or an I/O error occurs
+ */
+ public abstract boolean checkAccess(File f, int access);
+ /**
+ * Set on or off the access permission (to owner only or to all) to the file
+ * or directory denoted by the given abstract pathname, based on the parameters
+ * enable, access and oweronly.
+ */
+ public abstract boolean setPermission(File f, int access, boolean enable, boolean owneronly);
+
+ /**
+ * Return the time at which the file or directory denoted by the given
+ * abstract pathname was last modified, or zero if it does not exist or
+ * some other I/O error occurs.
+ */
+ public abstract long getLastModifiedTime(File f);
+
+ /**
+ * Return the length in bytes of the file denoted by the given abstract
+ * pathname, or zero if it does not exist, is a directory, or some other
+ * I/O error occurs.
+ */
+ public abstract long getLength(File f);
+
+
+ /* -- File operations -- */
+
+ /**
+ * Create a new empty file with the given pathname. Return
+ * <code>true</code> if the file was created and <code>false</code> if a
+ * file or directory with the given pathname already exists. Throw an
+ * IOException if an I/O error occurs.
+ */
+ public abstract boolean createFileExclusively(String pathname)
+ throws IOException;
+
+ /**
+ * Delete the file or directory denoted by the given abstract pathname,
+ * returning <code>true</code> if and only if the operation succeeds.
+ */
+ public abstract boolean delete(File f);
+
+ /**
+ * List the elements of the directory denoted by the given abstract
+ * pathname. Return an array of strings naming the elements of the
+ * directory if successful; otherwise, return <code>null</code>.
+ */
+ public abstract String[] list(File f);
+
+ /**
+ * Create a new directory denoted by the given abstract pathname,
+ * returning <code>true</code> if and only if the operation succeeds.
+ */
+ public abstract boolean createDirectory(File f);
+
+ /**
+ * Rename the file or directory denoted by the first abstract pathname to
+ * the second abstract pathname, returning <code>true</code> if and only if
+ * the operation succeeds.
+ */
+ public abstract boolean rename(File f1, File f2);
+
+ /**
+ * Set the last-modified time of the file or directory denoted by the
+ * given abstract pathname, returning <code>true</code> if and only if the
+ * operation succeeds.
+ */
+ public abstract boolean setLastModifiedTime(File f, long time);
+
+ /**
+ * Mark the file or directory denoted by the given abstract pathname as
+ * read-only, returning <code>true</code> if and only if the operation
+ * succeeds.
+ */
+ public abstract boolean setReadOnly(File f);
+
+
+ /* -- Filesystem interface -- */
+
+ /**
+ * List the available filesystem roots.
+ */
+ public abstract File[] listRoots();
+
+ /* -- Disk usage -- */
+ public static final int SPACE_TOTAL = 0;
+ public static final int SPACE_FREE = 1;
+ public static final int SPACE_USABLE = 2;
+
+ public abstract long getSpace(File f, int t);
+
+ /* -- Basic infrastructure -- */
+
+ /**
+ * Compare two abstract pathnames lexicographically.
+ */
+ public abstract int compare(File f1, File f2);
+
+ /**
+ * Compute the hash code of an abstract pathname.
+ */
+ public abstract int hashCode(File f);
+
+ // Flags for enabling/disabling performance optimizations for file
+ // name canonicalization
+ static boolean useCanonCaches = true;
+ static boolean useCanonPrefixCache = true;
+
+ private static boolean getBooleanProperty(String prop, boolean defaultVal) {
+ String val = System.getProperty(prop);
+ if (val == null) return defaultVal;
+ if (val.equalsIgnoreCase("true")) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ static {
+ useCanonCaches = getBooleanProperty("sun.io.useCanonCaches",
+ useCanonCaches);
+ useCanonPrefixCache = getBooleanProperty("sun.io.useCanonPrefixCache",
+ useCanonPrefixCache);
+ }
+}
Added: trunk/core/src/openjdk/vm/java/io/JNodeFileSystem.java
===================================================================
--- trunk/core/src/openjdk/vm/java/io/JNodeFileSystem.java (rev 0)
+++ trunk/core/src/openjdk/vm/java/io/JNodeFileSystem.java 2007-06-30 11:50:26 UTC (rev 3334)
@@ -0,0 +1,245 @@
+package java.io;
+
+import gnu.classpath.SystemProperties;
+
+/**
+ *
+ * @author Fabien DUMINY (fduminy at jnode.org)
+ *
+ */
+class JNodeFileSystem extends FileSystem {
+ private static final String dupSeparator;
+ static
+ {
+ String separator = SystemProperties.getProperty("file.separator");
+ dupSeparator = separator + separator;
+ }
+
+ @Override
+ public String canonicalize(String path) throws IOException {
+ // note : we expect that the File class from OpenJDK give an absolute path
+ return VMFile.toCanonicalForm(path);
+ }
+
+ @Override
+ public boolean checkAccess(File f, int access) {
+ boolean canAccess;
+ if (! VMFile.exists(f.getPath()))
+ return false;
+
+ switch(access)
+ {
+ case ACCESS_READ: canAccess = VMFile.canRead(f.getPath()); break;
+ case ACCESS_WRITE:
+ if (VMFile.isDirectory(f.getPath()))
+ canAccess = VMFile.canWriteDirectory(f);
+ else
+ canAccess = VMFile.canWrite(f.getPath());
+
+ break;
+ case ACCESS_EXECUTE: canAccess = VMFile.canExecute(f.getPath()); break;
+ default: throw new IllegalArgumentException("invalid access : "+access);
+ }
+ return canAccess;
+ }
+
+ @Override
+ public int compare(File f1, File f2) {
+ final String f1Path = f1.getAbsolutePath();
+ final String f2Path = f2.getAbsolutePath();
+ return f1Path.compareTo(f2Path);
+ }
+
+ @Override
+ public boolean createDirectory(File f) {
+ return VMFile.mkdir(f.getPath());
+ }
+
+ @Override
+ public boolean createFileExclusively(String pathname) throws IOException {
+ return VMFile.create(pathname);
+ }
+
+ @Override
+ public boolean delete(File f) {
+ return VMFile.delete(f.getPath());
+ }
+
+ @Override
+ public String fromURIPath(String path) {
+ return path;
+ }
+
+ @Override
+ public int getBooleanAttributes(File f) {
+ int attributes = 0;
+
+ attributes |= (VMFile.exists(f.getPath()) ? BA_EXISTS : 0);
+ attributes |= (VMFile.isFile(f.getPath()) ? BA_REGULAR : 0);
+ attributes |= (VMFile.isDirectory(f.getPath()) ? BA_DIRECTORY : 0);
+ attributes |= (VMFile.isHidden(f.getPath()) ? BA_HIDDEN : 0);
+
+ return attributes;
+ }
+
+ @Override
+ public String getDefaultParent() {
+ return File.separator;
+ }
+
+ @Override
+ public long getLastModifiedTime(File f) {
+ return VMFile.lastModified(f.getPath());
+ }
+
+ @Override
+ public long getLength(File f) {
+ return VMFile.length(f.getPath());
+ }
+
+ @Override
+ public char getPathSeparator() {
+ return SystemProperties.getProperty("path.separator").charAt(0);
+ }
+
+ @Override
+ public char getSeparator() {
+ return SystemProperties.getProperty("file.separator").charAt(0);
+ }
+
+ @Override
+ public long getSpace(File f, int t) {
+ long space = 0L;
+ switch(t)
+ {
+ case SPACE_TOTAL: space = VMFile.getTotalSpace(f.getPath()); break; //TODO
+ case SPACE_FREE: space = VMFile.getFreeSpace(f.getPath()); break; //TODO
+ case SPACE_USABLE: space = VMFile.getUsableSpace(f.getPath()); break; //TODO
+ }
+ return space;
+ }
+
+ /**
+ * implemented by taking the UNIX way regarding javadoc of File.hashCode() from openjdk
+ */
+ @Override
+ public int hashCode(File f) {
+ return f.getPath().hashCode() ^ 1234321;
+ }
+
+ @Override
+ public boolean isAbsolute(File f) {
+ return f.getPath().startsWith(File.separator);
+ }
+
+ @Override
+ public String[] list(File f) {
+ if (!f.exists() || !f.isDirectory())
+ return null;
+
+ // Get the list of files
+ return VMFile.list(f.getPath());
+ }
+
+ @Override
+ public File[] listRoots() {
+ return VMFile.listRoots();
+ }
+
+ @Override
+ public String normalize(String path) {
+ char separatorChar = SystemProperties.getProperty("file.separator").charAt(0);
+ int dupIndex = path.indexOf(dupSeparator);
+ int plen = path.length();
+
+ if (dupIndex == -1)
+ {
+ // Ignore trailing separator (though on Windows "a:\", for
+ // example, is a valid and minimal path).
+ if (plen > 1 && path.charAt (plen - 1) == separatorChar)
+ {
+ if (! (separatorChar == '\\' && plen == 3 && path.charAt (1) == ':'))
+ return path.substring (0, plen - 1);
+ }
+ else
+ return path;
+ }
+
+ StringBuffer newpath = new StringBuffer(plen);
+ int last = 0;
+ while (dupIndex != -1)
+ {
+ newpath.append(path.substring(last, dupIndex));
+ // Ignore the duplicate path characters.
+ while (path.charAt(dupIndex) == separatorChar)
+ {
+ dupIndex++;
+ if (dupIndex == plen)
+ return newpath.toString();
+ }
+ newpath.append(separatorChar);
+ last = dupIndex;
+ dupIndex = path.indexOf(dupSeparator, last);
+ }
+
+ newpath.append(path.substring(last, plen));
+
+ return newpath.toString();
+ }
+
+ @Override
+ public int prefixLength(String path) {
+ return path.lastIndexOf(File.separatorChar) + 1;
+ }
+
+ @Override
+ public boolean rename(File f1, File f2) {
+ return VMFile.renameTo(f1.getPath(), f2.getPath());
+ }
+
+ @Override
+ public String resolve(String parent, String child) {
+ return parent + File.separatorChar + child;
+ }
+
+ @Override
+ public String resolve(File f) {
+ if (isAbsolute(f))
+ return f.getPath();
+
+ String currentDir = System.getProperty("user.dir");
+
+ if (currentDir.endsWith(File.separator))
+ return currentDir + f.getPath();
+ else
+ return currentDir + File.separator + f.getPath();
+ }
+
+ @Override
+ public boolean setLastModifiedTime(File f, long time) {
+ return VMFile.setLastModified(f.getPath(), time);
+ }
+
+ @Override
+ public boolean setPermission(File f, int access, boolean enable,
+ boolean owneronly)
+ {
+ boolean success = false;
+ switch(access)
+ {
+ case ACCESS_READ: success = VMFile.setReadable(f.getPath(), enable, owneronly); break;
+ case ACCESS_WRITE: success = VMFile.setWritable(f.getPath(), enable, owneronly); break;
+ case ACCESS_EXECUTE: success = VMFile.setExecutable(f.getPath(), enable, owneronly); break;
+ }
+ return success;
+ }
+
+ @Override
+ public boolean setReadOnly(File f) {
+ // Test for existence.
+ if (! VMFile.exists(f.getPath()))
+ return false;
+
+ return VMFile.setReadOnly(f.getPath());
+ }
+}
Added: trunk/core/src/openjdk/vm/java/io/NativeFileSystem.java
===================================================================
--- trunk/core/src/openjdk/vm/java/io/NativeFileSystem.java (rev 0)
+++ trunk/core/src/openjdk/vm/java/io/NativeFileSystem.java 2007-06-30 11:50:26 UTC (rev 3334)
@@ -0,0 +1,18 @@
+package java.io;
+
+
+/**
+ *
+ * @author Fabien DUMINY (fduminy at jnode.org)
+ *
+ */
+public class NativeFileSystem {
+ /**
+ * Return the FileSystem object representing this platform's local
+ * filesystem.
+ */
+ public static Object getFileSystem()
+ {
+ return new JNodeFileSystem();
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|