Class DataFiles
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.data.DataFiles
-
public class DataFiles extends Object
This class contains utility methods on DataFile objects.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description DataFiles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copy(DataFile input, DataFile output)
Copy a file, if input data is compressed, data will be uncompressed and if output require to be compressed output will be compressed.static void
rawCopy(DataFile input, DataFile output)
Copy a file.static void
symlinkOrCopy(DataFile input, DataFile output)
Create a symbolic link if the input and output use the same protocol and if symbolic links are supported by the protocol.static void
symlinkOrCopy(DataFile input, DataFile output, boolean relativize)
Create a symbolic link if the input and output use the same protocol and if symbolic links are supported by the protocol.
-
-
-
Method Detail
-
copy
public static void copy(DataFile input, DataFile output) throws IOException
Copy a file, if input data is compressed, data will be uncompressed and if output require to be compressed output will be compressed.- Parameters:
input
- input fileoutput
- output file.- Throws:
IOException
- if an error occurs while copying data
-
rawCopy
public static void rawCopy(DataFile input, DataFile output) throws IOException
Copy a file.- Parameters:
input
- input fileoutput
- output file.- Throws:
IOException
- if an error occurs while copying data
-
symlinkOrCopy
public static void symlinkOrCopy(DataFile input, DataFile output) throws IOException
Create a symbolic link if the input and output use the same protocol and if symbolic links are supported by the protocol. If symbolic link cannot be created, the input file will be copied.- Parameters:
input
- input fileoutput
- output file- Throws:
IOException
- if an error occurs while copying data or creating the symbolic link
-
symlinkOrCopy
public static void symlinkOrCopy(DataFile input, DataFile output, boolean relativize) throws IOException
Create a symbolic link if the input and output use the same protocol and if symbolic links are supported by the protocol. If symbolic link cannot be created, the input file will be copied.- Parameters:
input
- input fileoutput
- output filerelativize
- relativize the link target path- Throws:
IOException
- if an error occurs while copying data or creating the symbolic link
-
-