Top "File-io" questions

File I/O is input/output that involves the file system.

Java FileOutputStream Create File if not exists

Is there a way to use FileOutputStream in a way that if a file (String filename) does not exist, then …

java file file-io new-operator fileoutputstream
How to write console output to a txt file

I have tried to write the console output to a txt file using this code suggestion (http://www.daniweb.com/…

java file-io console
How to create a file in a directory in java?

If I want to create a file in C:/a/b/test.txt, can I do something like: File f = …

java file-io
How to write a UTF-8 file with Java?

I have some current code and the problem is its creating a 1252 codepage file, i want to force it to …

java file-io utf-8
What are all the common ways to read a file in Ruby?

What are all the common ways to read a file in Ruby? For instance, here is one method: fileObj = File.…

ruby file-io
Parsing CSV files in C#, with header

Is there a default/official/recommended way to parse CSV files in C#? I don't want to roll my own …

c# csv file-io io header
getResourceAsStream returns null

I'm loading a text file from within a package in a compiled JAR of my Java project. The relevant directory …

java file-io resources
ValueError : I/O operation on closed file

import csv with open('v.csv', 'w') as csvfile: cwriter = csv.writer(csvfile, delimiter=' ', quotechar='|', quoting=…

python csv file-io io
Writing a Python list of lists to a csv file

I have a long list of lists of the following form --- a = [[1.2,'abc',3],[1.2,'werew',4],........,[1.4,'qew',2]] i.e. the values …

python file csv file-io python-2.7
Write lines of text to a file in R

In the R scripting language, how do I write lines of text, e.g. the following two lines Hello World …

file-io r