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
     
  • Method Summary

    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
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DataFiles

      public DataFiles()
  • Method Details

    • 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 file
      output - 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 file
      output - 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 file
      output - 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 file
      output - output file
      relativize - relativize the link target path
      Throws:
      IOException - if an error occurs while copying data or creating the symbolic link