Top "File-io" questions

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

How do I create directory if it doesn't exist to create a file?

I have a piece of code here that breaks if the directory doesn't exist: System.IO.File.WriteAllText(filePath, content); …

c# .net file-io
How to both read and write a file in C#

I want to both read from and write to a file. This doesn't work. static void Main(string[] args) { StreamReader …

c# file-io filestream
How to create an Excel File with Nodejs?

I am a nodejs programmer . Now I have a table of data that I want to save in Excel File …

excel node.js file-io export-to-excel npm
Read CSV file column by column

I want to read specific columns from a multi column csv file and print those columns in other csv file …

java csv file-io multiple-columns
Do I need to pass the full path of a file in another directory to open()?

I have a folder with ten files in it which I want to loop through. When I print out the …

python file-io absolute-path
Get last n lines of a file, similar to tail

I'm writing a log file viewer for a web application and for that I want to paginate through the lines …

python file file-io tail logfile
Why doesn't java.io.File have a close method?

While java.io.RandomAccessFile does have a close() method java.io.File doesn't. Why is that? Is the file closed …

java file-io
Delete file from internal storage

I'm trying to delete images stored in internal storage. I've come up with this so far: File dir = getFilesDir(); File …

android file-io
Objective-C: Reading a file line by line

What is the appropriate way of dealing with large text files in Objective-C? Let's say I need to read each …

objective-c file-io nsstring enumerate nsstream
Getting "java.nio.file.AccessDeniedException" when trying to write to a folder

For some reason I keep getting java.nio.file.AccessDeniedException every time I try to write to a folder on …

java file-io io access-denied