DEADSOFTWARE

Mirror gpcp-32255
[gpcp-linux.git] / libs / java / GPFiles.java
1 //
2 // Body of GPFiles interface.
3 // This file implements the code of the GPFiles.cp file.
4 // dwc August 1999.
7 package CP.GPFiles;
9 import java.io.*;
11 public class GPFiles {
13 public static char pathSep = System.getProperty("path.separator").charAt(0);
14 public static char fileSep = System.getProperty("file.separator").charAt(0);
15 public static char optChar = '-';
17 public static boolean isOlder(GPFiles_FILE first, GPFiles_FILE second) {
18 return (first.f.lastModified() < second.f.lastModified());
19 }
21 public static void MakeDirectory(char[] dirName) {
22 File path = new File(CP.CPJ.CPJ.MkStr(dirName));
23 if (!path.exists()) {
24 boolean ok = path.mkdirs();
25 }
26 }
28 public static char[] CurrentDirectory() {
29 String curDir = System.getProperty("user.dir");
30 return curDir.toCharArray();
31 }
33 public static boolean exists(char[] dirName) {
34 File path = new File(CP.CPJ.CPJ.MkStr(dirName));
35 return path.exists();
36 }
38 }