Class DataFiles
java.lang.Object
fr.ens.biologie.genomique.eoulsan.data.DataFiles
This class contains utility methods on DataFile objects.
- Since:
- 2.0
- Author:
- Laurent Jourdren
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCopy a file, if input data is compressed, data will be uncompressed and if output require to be compressed output will be compressed.static voidCopy a file.static voidsymlinkOrCopy(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 voidsymlinkOrCopy(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.
-
Constructor Details
-
DataFiles
public DataFiles()
-
-
Method Details
-
copy
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
Copy a file.- Parameters:
input- input fileoutput- output file.- Throws:
IOException- if an error occurs while copying data
-
symlinkOrCopy
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
-