package com.perforce.client.api; import java.io.*; public class FileSys { private boolean javaCreatedTheInstance; int instance = 0; // private static native int nNewInstance(); private static native void nDeleteInstance( int instance); private File javaFile = null; /* FileSys() { this.instance = nNewInstance(); javaCreatedTheInstance = true; } */ FileSys( int instance ) { this.instance = instance; javaCreatedTheInstance = false; } protected void finalize() { if ( javaCreatedTheInstance ) { nDeleteInstance( this.instance ); } } private static native String nName( int instance ); private File iGetFile() { if ( javaFile == null ) { javaFile = new File( nName( this.instance ) ); } return javaFile; } public File getJavaFile() { return iGetFile(); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 783 | paul_hammant |
First cut of P4 Soap API. Uses Glue, can't work yet as DLLs missing. |
||
//guest/michael_bishop/P4APIForJava/java/com/perforce/client/api/FileSys.java | |||||
#1 | 430 | Michael Bishop |
Initial checkin. Seems to work. Not very much testing. Not very much documentation. Some more commenting needs to take place. But, it's there to experiment with. |