public static void stringToFile ( FileSystem fs , Path path , String string ) throws IOException { OutputStream os = fs . create ( path , true ) ; PrintWriter pw = new PrintWriter ( os ) ; pw . append ( string ) ; pw . close ( ) ; }
Creates a file with the given string overwritting if needed .