[go: up one dir, main page]

Menu

[r24]: / cell / Profile.java  Maximize  Restore  History

Download this file

28 lines (27 with data), 624 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package cell;
import java.io.*;
class Profile
{
private static String application = "ActionPOS"; // such a hack:
// whenever we copy this package, we must manually change this to the new application's name.
private static String entity;
static File rooted(String name)
{
File f = new File(System.getProperty("user.home") );
f = new File(f, application);
if (entity != null)
f = new File(f, entity);
if (name != null)
f = new File(f, name);
return f;
}
public static void setEntity(String v)
{
entity = v;
rooted(null).mkdirs();
}
static
{
setEntity(null);
}
}