1
2
3
4 package joeq.ClassLib.sun13_win32.java.io;
5
6 import joeq.Memory.HeapAddress;
7 import joeq.Runtime.SystemInterface;
8
9 /***
10 * Win32FileSystem
11 *
12 * @author John Whaley <jwhaley@alum.mit.edu>
13 * @version $Id: Win32FileSystem.java 1456 2004-03-09 22:01:46Z jwhaley $
14 */
15 public abstract class Win32FileSystem {
16
17
18 private static String getDriveDirectory(int i) {
19 byte[] b = new byte[256];
20 int result = SystemInterface.fs_getdcwd(i, b);
21 if (result == 0) throw new InternalError();
22 String res = SystemInterface.fromCString(HeapAddress.addressOf(b));
23
24 if (res.charAt(1) == ':') return res.substring(2);
25 else return res;
26 }
27
28 }