Ejemplo n.º 1
0
  public static void clean_finance_directory(String directory_path) {
    // There will be one directory for each finance data type.
    for (StockXv.FinanceSymbols s : StockXv.FinanceSymbols.values()) {
      File directory = new File(directory_path + "\\" + s.getName());
      // If the directory does not exist then create it and 2 sub-directories inside of it for raw
      // data and for serialized data.
      if (!directory.exists()) {
        directory.mkdir();

        File sub_raw_data_directory =
            new File(directory_path + "\\" + s.getName() + "\\" + RAW_DATA);
        File sub_serialized_data_directory =
            new File(directory_path + "\\" + s.getName() + "\\" + SERIALIZED_DATA);

        sub_raw_data_directory.mkdir();
        sub_serialized_data_directory.mkdir();
      }
    }
  }
Ejemplo n.º 2
0
 public static String get_directory_for_finance_type(StockXv.FinanceSymbols symbol) {
   return FINANCE_DATA_PATH + symbol.getName();
 }