File handling refers to the set of tools, functions, and libraries to work with files and file handles. Creating, writing, appending, moving, and deleting files fall in this domain.

learn more… | top users | synonyms

4
votes
1answer
151 views

Why is Java 7's new file API usage still so scarce? [closed]

I don't even know whether this is the correct StackExchange site to ask such a question but here it is... I principally lurk on StackOverflow; and I am frankly flabbergasted by the number of ...
0
votes
1answer
40 views

Whats a good structure to save and retrieve locations of images?

I got a java-ee application, where I collect informations about movies. Im my backend I provide data like the name, description, genre and a random uuid. I also got lots of related files, which are ...
0
votes
3answers
77 views

Write to stdout and redirect or write directly to file?

I can see two ways to fill an empty file with data: $ run_program arg1 > data_file or, specifically write code that manages a file and write to it? ie. a file stream? Which is better to ...
0
votes
1answer
76 views

How can I handle this string concatenation in C in a reusable way

I've been writing a small C application that operates on files, and I've found that I have been copy+pasting this code around my functions: char fullpath[PATH_MAX]; fullpath[0] = '\0'; ...
0
votes
0answers
15 views

how to write to file from database [migrated]

i am trying to write to file from database where i stored coordinates values. The file i want to save to is SVG file, the code i was confused with how to replace moveTo coordinates and curveTo ...
0
votes
3answers
92 views

Advantage of monitoring file change using Windows API rather than manually

I developed a Windows software about an year ago. Part of it was to monitor few configuration files for manual changes by user and if any of these change restart a particular service. So, I used the ...
3
votes
2answers
146 views

What is a stream, and how does it work?

Like a data stream in general, this can be an I/O stream or memory stream or a file stream or what not. I understand that it's some sort of stream of bytes, that you can read to parse very large ...
0
votes
1answer
41 views

Uploading files(code) on a web server?

I have a very small and basic web site on a web server. Usually I'm doing the changes on a localhost where the development version is, and after that I upload it to the server with FileZilla. That's ...
0
votes
3answers
80 views

Advice on which storage technology for an Image repository [duplicate]

At this point, I'm not much of a programmer, solid html/css, familiar with JS but not a programmer by any means. I'm looking to pick up whatever is necessary for an upcoming project. I need to build ...
4
votes
1answer
409 views

Designing status management for a file processing module

The background One of the functionality of a product that I am currently working on is to process a set of compressed files ( containing XML files ) that will be made available at a fixed location ...
2
votes
1answer
82 views

How to share a file over multiple projects

I'm using Visual Studio 2010 to amend a C# project. Part of the application requires the user to be able to save and read a settings file (1 Project reads them in (as read only) from a file. The ...
1
vote
1answer
196 views

Editing files without race conditions?

I have a CSV file that needs to be edited by multiple processes at the same time. My question is, how can I do this without introducing race conditions? It's easy to write to the end of the file ...
1
vote
2answers
287 views

Ruby: Multithreading a CSV with output

I have a script written in Ruby that has maxed out a core in my server's Xeon processor for the last 2 hours. Since it's currently only using 1 of four possible cores, I want to try and rewrite the ...
3
votes
4answers
373 views

Test Driven Development: A good/accepted way to test file system operations?

I am working on a project at the moment that generates a table (among other things) based on the contents of a file-system, and and in turn does some meta-data modifications on the things it finds. ...
0
votes
3answers
123 views

CSS File Editing for Teams? (how to avoid stepping on each others' feet?!)

I'm wondering if anyone has a good solution for when you're working as a team and there's a single file used throughout a project (like a styles.css file) and everyone needs to use it throughout the ...
13
votes
1answer
800 views

How do I test a file reader?

I am working on a project with a few file formats. Some formats are specified by .xsds, others by documentation on their respective websites, and some are custom in-house formats that have no ...
3
votes
1answer
300 views

How to simulate inner join on very large files in java (without running out of memory)

I am trying to simulate SQL joins using java and very large text files (INNER, RIGHT OUTER and LEFT OUTER). The files have already been sorted using an external sort routine. The issue I have is I am ...
4
votes
2answers
489 views

What is the best practice for reading a large number of custom settings from a text file?

So I have been looking through some code I wrote a few years ago for an economic simulation program. Each simulation has a large number of settings that can be saved to a file and later loaded back ...
0
votes
2answers
2k views

How to update an existing excel file using java program? [closed]

I've made a file browser in java that opens and read already been made excel files. (using Apache poi 3.9 library) program read those files perfectly but i want to update some of those files. how can ...
1
vote
3answers
254 views

Maintaining log stream after file name change

I'm trying to log to a file and move it about every 30 seconds. I'm using the os.rename function (which I do from a supervisord process) in python to move the current log to a timestamped log (which ...
6
votes
5answers
362 views

How are new file formats constructed?

I've used a software suite that is installed in offices and on remote vessels. The installations communicate back and forth, and they do that by using a simple proprietary file format that looks ...
0
votes
1answer
253 views

Reading a specific type of input from file

I have a software that reads from a file. Each object in the software takes 7 inputs viz. string string string float string float int I have an input file. It contains a number of input values. If ...
49
votes
12answers
25k views

Is it a bad practice to store large files (10 MB) in a database? [closed]

I am currently creating a web application that allows users to store and share files, 1 MB - 10 MB in size. It seems to me that storing the files in a database will significantly slow down ...
-3
votes
1answer
307 views

Openning an Excel File (Like it opens in MS office when double clicked) but using java

some buddy told me there is nothing impossible in programming but i dont know about this one... :) well i want to open an .xlsx file and make it appear on screen normal in MS office, but the problem ...
5
votes
3answers
316 views

Where to load and store settings from a file?

I think this question should apply to most programs that load settings from a file. My question is from a programming point of view, and it is really how to deal with the loading of settings from a ...
4
votes
5answers
351 views

Should I encrypt files saved by my program

I'm trying to decide on what format I should save data in, and hopefully this question will help me come to a decision. The program I'm writing uses 'databases' in which word=meaning (not a ...
2
votes
2answers
463 views

Optimize Reading of Multiple files

I have a unique problem which I'm hoping someone can assist with. I have One big text file, our Production file. The data in the file is delimited in the following format Reference|Cost ...
11
votes
7answers
1k views

Is it necessary to read every single byte to check if a copied file is identical to the original?

I recently learned of a program called Total Commander. It's a Windows Explorer replacement and has its own stuff to copy files. To check whether the files are identical, instead of calculation a CRC, ...
0
votes
0answers
109 views

Use of file handling and serialization over DBMS [duplicate]

Large scale projects always prefer DBMS(Database Management System) for storing information. Nearly all the languages offer file handling, like Java has concepts of serialization to write objects and ...
0
votes
1answer
739 views

How to design an application that read files using MVC pattern?

I am going to write an application that reads data from a csv file, and display that data to the user. I intend to apply an MVC design pattern to create this application. A user will interact with ...
9
votes
4answers
2k views

What's the best practice for naming uploaded images?

Suppose I have a form in my web application where users can upload a profile picture. I've got few requirements about file size, dimensions etc, but when the user uploads the image, how should I name ...
3
votes
3answers
195 views

Storing lots of large strings with frequent “appends” and few reads

In my current project, I need to store a very long ASCII string to each instance of a given object. This string will receive an 2 appends per minute and will not be retrieved so frequently. The ...
3
votes
2answers
3k views

PHP file_put_contents File Locking

The Senario: You have a file with a string (average sentence worth) on each line. For arguments sake lets say this file is 1Mb in size (thousands of lines). You have a script that reads the file, ...
1
vote
1answer
96 views

Efficient way to check for changes to the contents of folders

I am creating an application that maintains a database of files of a certain type in a given folder (and all subfolders) Initially the program will recurse the folders and add any file it finds of ...
1
vote
2answers
187 views

Quickly compute added and removed lines

I'm trying to compare two text files. I want to compute how many lines were added and removed. Basically what git diff --stat is doing. Bonus points for not having to store the entire file contents in ...
2
votes
2answers
113 views

Criteria for selecting timeout value?

Situation: a piece of software reads frames of data from a file in a seperate thread and puts it on a queue, emptied by another thread. That second thread periodically checks on the queue and fails ...
3
votes
1answer
117 views

What does “windowed streaming” stand for?

So I was asking around the Mercurial development mailing list about binary diffing and patch handling and I got the following examples: whole file approaches (classic diff, bsdiff, Mercurial's ...
0
votes
1answer
2k views

How are Java ByteBuffer's limit and position variable's updated?

There are two scenarios: writing and reading Writing: Whenever I write something to the ByteBuffer by calling its put(byte[]) method the position variable is incremented as: current position + size of ...
1
vote
1answer
238 views

hash with file instead of array

Is it possible to use hash function but with File instead of Array, and it's gonna be saving the record in a file position and then search will fseek to that position, but I'm not sure how to open a ...
1
vote
2answers
96 views

How to handle file access transactions properly?

I'm looking for good practices or any advice regarding file access transaction mechanisms. We will have multiple instances of an application spread over a redundant network (cloud) watching a ...
2
votes
1answer
88 views

File Processing Times

I have a very simple program in Ruby that opens a dictionary file, sorted-words.txt and prints out all the words in pig-latin. I tested its speed, and the first time I ran it, the program finished in ...
2
votes
4answers
250 views

Where can I learn about how programs handle file systems like NTFS?

I'm writing a program to handle the xbox 360's STFS files. I'm encountering all sorts of problems about how to keep track of used vs unused blocks, reading non-sequential files, etc. These aren't so ...
0
votes
1answer
202 views

How to synchronize web page refresh with file upload from windows application?

I have a rather simple app in .net which uploads images in fixed intervals in an ftp server. The file name is specific. I need to have a web page that refreshes but i want this to happen only when ...
3
votes
3answers
454 views

Was API hooking done as needed for Stuxnet to work? I don't think so

Caveat: I am a political science student and I have tried my level best to understand the technicalities; if I still sound naive please overlook that. In the Symantec report on Stuxnet, the authors ...
0
votes
1answer
125 views

“t-sql” tool for csv files? [closed]

Is there a tool that allows to query files based on the following criteria, and change them? creation date filenames (e.g. filetypeA_YYYYMMDD_data2.blah) file content For the example, the workflow ...
8
votes
4answers
275 views

Should the creation of an object implicitly or explicitly create a file?

I'm creating an object whose sole purpose is to read in a file of one format and create another of a different format. Is it best to create the output file implicitly during object initialization or ...
7
votes
9answers
2k views

Multithreaded file copy

There is an utility we have which is used to upload files (and perform other operations on the file) to a network shared location. The file size tends to vary from a few mb to 500 mb. A suggestion has ...
4
votes
3answers
428 views

Any good reason to open files in text mode?

(Almost-)POSIX-compliant operating systems and Windows are known to distinguish between 'binary mode' and 'text mode' file I/O. While the former mode doesn't transform any data between the actual file ...
-2
votes
3answers
351 views

What scripting language to use for large file transfers on windows xp client machines

I'm a java developer that is tasked with creating some scripts that will handle large xml document file transfers by hitting some web service api's from windows xp client machines. There may be other ...
3
votes
3answers
307 views

Design: Method that loads data from one of two file formats?

Say I have a class Person: class Person { string FullName; int Age; } And I need to load a list of Person's from a plain text file. The text file could be in one of two formats. I want a ...