Category "file-io"

How to let user write into the file in c++ using put() function?

I'm writing a c++ program to open a file with the user-defined file name. And then using the put() function to let the user write into the file until a newline

Java Image orientation transfers from Landscape to Portrait ImageIO.read()

when the image is loaded from localdrive by default my image rotates to Portrait from Landscape. My image type is ".jpg" and size is 1.32MB. To verify the issue

How to read a .txt file from terminal, and then extract contents from file?

I am wanting to use C++ to extract the contents of a .txt file (that will be pointed to from the terminal) that is to be parsed, but I am not sure how to go abo

Why does my file sometimes disappear in the process of reading from it or writing to it?

I have an app that reads from text files to determine which reports should be generated. It works as it should most of the time, but once in awhile, the program

Read a set of lines from a file using BufferedReader

I have one large CSV file of around 1.6 GB and I am trying to read that file and create JSON array of these lines and send it to other consumables processes. I

Read and write a String from text file

I need to read and write data to/from a text file, but I haven't been able to figure out how. I found this sample code in the Swift's iBook, but I still don't

Converting MultipartFile to java.io.File without copying to local machine

I have a Java Spring MVC web application. From client, through AngularJS, I am uploading a file and posting it to Controller as webservice. In my Controller, I

Windows CreateFile Possible Error Codes

I'm playing around with abstracting Windows, Linux, and Mac File IO calls into macros (to avoid C runtime, so no fopen, fclose, etc...). I've actually got quit

Read users and passwords from a txt file

I have a txt file which looks like this USER: user46226234 PASS: #)(HF(WE*FHWE USER: user49503420594 PASS: yellowbird USER: user449202934 PASS: dog I'm trying

I can't get netbeans to find a txt file I have in the same directory... java.io.FileNotFoundException

I can't make it path specific because once I get this program to work (this is the last thing I have to do) I'm uploading to my university's ilearn website and

Java - SQLITE_BUSY; database file is locked

My application reads a html table and then a script (TableToCSV) converts it into a .csv format. After that I convert that .csv into a sqlite database. After th

HTML input type=file, get the image before submitting the form

I'm building a basic social network and in the registration the user uploads a display image. Basically I wanted to display the image, like a preview on the sam

Reading lines with BufferedReader and checking for end of file

If I have something like this in my code: String line = r.readLine(); //Where r is a bufferedReader How can I avoid a crash if the next line is the end of t

Why does fread always return 0?

I used this code to read file. But fread function always return 0. What is my mistake? FILE *file = fopen(pathToSourceFile, "rb"); if(file!=NULL) { char a

Delphi notification when a file gets updated

My app contains documents in its database. The users can open the documents in which case, the document gets saved to a temporary folder and gets opened on the

Passing in a file name / directory into command line in Java

I'm trying to do some processing on whether the user enters a (1) file name, or (2) directory name into the command line. Anything else should throw an error.