Package org.javlo.service.syncro
Class FileStructureFactory
- java.lang.Object
-
- org.javlo.service.syncro.FileStructureFactory
-
public class FileStructureFactory extends Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFileStructureFactory(File baseFolder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Map<String,FileInfo>asMapByPath(List<FileInfo> list)static Map<String,FileInfo>cloneMap(Map<String,FileInfo> map)List<FileInfo>fileTreeToList(boolean useKnownFiles, boolean includeDeleted)Map<String,FileInfo>fileTreeToMap(boolean useKnownFiles, boolean includeDeleted)StringfileTreeToProperties()Deprecated.static FileStructureFactorygetInstance(File baseFolder)booleanisMarkedAsDeleted(File file)static voidmain(String[] args)voidmarkAsDeleted(File file)static Map<String,FileInfo>readFromStream(InputStream in)static voidwriteToStream(Collection<FileInfo> list, OutputStream outStream)
-
-
-
Constructor Detail
-
FileStructureFactory
protected FileStructureFactory(File baseFolder)
-
-
Method Detail
-
getInstance
public static FileStructureFactory getInstance(File baseFolder)
-
markAsDeleted
public final void markAsDeleted(File file) throws IOException
- Throws:
IOException
-
isMarkedAsDeleted
public final boolean isMarkedAsDeleted(File file) throws IOException
- Throws:
IOException
-
fileTreeToProperties
@Deprecated public final String fileTreeToProperties() throws IOException
Deprecated.- Throws:
IOException
-
fileTreeToMap
public Map<String,FileInfo> fileTreeToMap(boolean useKnownFiles, boolean includeDeleted) throws IOException
- Throws:
IOException
-
fileTreeToList
public List<FileInfo> fileTreeToList(boolean useKnownFiles, boolean includeDeleted) throws IOException
- Throws:
IOException
-
readFromStream
public static Map<String,FileInfo> readFromStream(InputStream in) throws IOException
- Throws:
IOException
-
writeToStream
public static void writeToStream(Collection<FileInfo> list, OutputStream outStream) throws IOException
- Throws:
IOException
-
main
public static void main(String[] args)
-
-