diff java/src/java/io/File.d @ 0:6dd524f61e62

add dwt win and basic java stuff
author Frank Benoit <benoit@tionex.de>
date Mon, 02 Mar 2009 14:44:16 +0100
parents
children 9b96950f2c3c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/java/src/java/io/File.d	Mon Mar 02 14:44:16 2009 +0100
@@ -0,0 +1,203 @@
+/**
+ * Authors: Frank Benoit <keinfarbton@googlemail.com>
+ */
+module java.io.File;
+
+import java.lang.all;
+
+static import tango.io.model.IFile;
+static import tango.io.FilePath;
+static import tango.io.Path;
+static import tango.io.FileSystem;
+
+public class File {
+
+    public static char separatorChar;
+    public static String separator;
+    public static char pathSeparatorChar;
+    public static String pathSeparator;
+
+    private tango.io.FilePath.FilePath mFilePath;
+
+    static this(){
+        separator = tango.io.model.IFile.FileConst.PathSeparatorString;
+        separatorChar = tango.io.model.IFile.FileConst.PathSeparatorChar;
+        pathSeparator = tango.io.model.IFile.FileConst.SystemPathString;
+        pathSeparatorChar = tango.io.model.IFile.FileConst.SystemPathChar;
+    }
+
+    public this ( String pathname ){
+        mFilePath = new tango.io.FilePath.FilePath( tango.io.Path.standard( pathname ));
+    }
+
+    public this ( String parent, String child ){
+        mFilePath = new tango.io.FilePath.FilePath( tango.io.FilePath.FilePath.join( parent, child ) );
+    }
+
+    public this ( java.io.File.File parent, String child ){
+        mFilePath = new tango.io.FilePath.FilePath( tango.io.FilePath.FilePath.join( parent.mFilePath.toString, child ) );
+    }
+
+    public int getPrefixLength(){
+        implMissing( __FILE__, __LINE__ );
+        return 0;
+    }
+
+    public String getName(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public String getParent(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public java.io.File.File getParentFile(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public String getPath(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public bool isAbsolute(){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public String getAbsolutePath(){
+        return tango.io.FileSystem.FileSystem.toAbsolute( mFilePath ).toString;
+    }
+
+    public java.io.File.File getAbsoluteFile(){
+        return new File( getAbsolutePath() );
+    }
+
+    public String getCanonicalPath(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public java.io.File.File getCanonicalFile(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public bool canRead(){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public bool canWrite(){
+        return mFilePath.isWritable;
+    }
+
+    public bool exists(){
+        return mFilePath.exists;
+    }
+
+    public bool isDirectory(){
+        return mFilePath.isFolder;
+    }
+
+    public bool isFile(){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public bool isHidden(){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public long lastModified(){
+        implMissing( __FILE__, __LINE__ );
+        return 0L;
+    }
+
+    public long length(){
+        implMissing( __FILE__, __LINE__ );
+        return 0L;
+    }
+
+    public bool createNewFile(){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public bool delete_KEYWORDESCAPE(){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public void deleteOnExit(){
+        implMissing( __FILE__, __LINE__ );
+    }
+
+    public String[] list(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public java.io.File.File[] listFiles(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public bool mkdir(){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public bool mkdirs(){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public bool renameTo( java.io.File.File dest ){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public bool setLastModified( long time ){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public bool setReadOnly(){
+        implMissing( __FILE__, __LINE__ );
+        return false;
+    }
+
+    public static java.io.File.File[] listRoots(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public static java.io.File.File createTempFile( String prefix, String suffix, java.io.File.File directory ){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public static java.io.File.File createTempFile( String prefix, String suffix ){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+    public int compareTo( java.io.File.File pathname ){
+        implMissing( __FILE__, __LINE__ );
+        return 0;
+    }
+
+    public String toString(){
+        implMissing( __FILE__, __LINE__ );
+        return null;
+    }
+
+
+}
+
+