core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SDKCacheUtils.java
equal
deleted
inserted
replaced
15 import java.io.IOException; |
15 import java.io.IOException; |
16 import java.io.ObjectInputStream; |
16 import java.io.ObjectInputStream; |
17 import java.io.ObjectStreamClass; |
17 import java.io.ObjectStreamClass; |
18 |
18 |
19 import org.eclipse.core.runtime.IPath; |
19 import org.eclipse.core.runtime.IPath; |
|
20 import org.eclipse.core.runtime.Path; |
20 |
21 |
21 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin; |
22 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin; |
22 import com.nokia.cpp.internal.api.utils.core.CacheUtils; |
23 import com.nokia.cpp.internal.api.utils.core.CacheUtils; |
23 |
24 |
24 public class SDKCacheUtils extends CacheUtils { |
25 public class SDKCacheUtils extends CacheUtils { |
|
26 |
|
27 private static final String CACHE_FOLDER_NAME = "CarbideSDKCache"; //$NON-NLS-1$ |
|
28 private static SDKCacheUtils cache; |
|
29 |
|
30 public static SDKCacheUtils getCache() { |
|
31 if (cache == null) |
|
32 { |
|
33 IPath path = new Path(System.getProperty("user.home")); |
|
34 cache = new SDKCacheUtils(path.append(CACHE_FOLDER_NAME)); |
|
35 } |
|
36 return cache; |
|
37 } |
25 |
38 |
26 public SDKCacheUtils(IPath defaultLocation) { |
39 public SDKCacheUtils(IPath defaultLocation) { |
27 super(defaultLocation); |
40 super(defaultLocation); |
28 } |
41 } |
29 |
42 |