Пример #1
0
 @operator(value = "as_csv", can_be_const = true, index_type = IType.INT)
 @doc(
     deprecated = "use csv_file(path, separator) instead",
     value =
         "allows to specify the character to use as a separator for a CSV format and returns the file. Yields an error if the file is not a text file",
     examples =
         @example("let fileT type: file value: text(\"../includes/Stupid_Cell.csv\") as_csv ';';"))
 @Deprecated
 public static IGamaFile as_csv(final IScope scope, final IGamaFile file, final String s)
     throws GamaRuntimeException {
   return new GamaCSVFile(scope, file.getPath(), s);
   // if ( !(file instanceof GamaTextFile) ) { throw GamaRuntimeException
   // .warning("The 'as_csv' operator can only be applied to text files"); }
   // if ( s == null || s.isEmpty() ) { throw GamaRuntimeException
   // .warning("The 'as_csv' operator expects a non-empty string as its right operand"); }
   // ((GamaTextFile) file).setCsvSeparators(s);
   // return file;
 }