18 package org.turro.elephant.impl.util;
21 import java.io.FileFilter;
22 import org.turro.elephant.context.ElephantContext;
30 public static File
getFile(String fileName) {
34 public static File[]
getFiles(String rootName) {
36 if(!root.exists()) root.mkdirs();
41 return root.listFiles(
new FileFilter() {
43 public boolean accept(File pathname) {
44 return pathname.isFile() || !pathname.isHidden();
49 public static void serialize(String fileName, Object instance) {
54 public static void serialize(File file, Object instance) {
55 File root =
new File(org.amic.util.file.FileUtil.getParentPath(file));
56 if(!root.exists()) root.mkdirs();
57 org.turro.reflection.Serializer.serialize(file, instance);
66 return org.turro.reflection.Serializer.deserialize(file);
69 public static void remove(String fileName) {
74 public static void remove(File file) {
static String getRealPath(String path)
static void serialize(File file, Object instance)
static void serialize(String fileName, Object instance)
static Object deserialize(String fileName)
static File getFile(String fileName)
static File[] getFiles(File root)
static File[] getFiles(String rootName)
static Object deserialize(File file)