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

1
vote
1answer
252 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 ...
55
votes
12answers
44k 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 ...
1
vote
2answers
97 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
92 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
255 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
231 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
482 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 ...
12
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, ...
7
votes
9answers
3k 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
570 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
402 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 ...
8
votes
4answers
286 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 ...
4
votes
3answers
570 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 ...
3
votes
3answers
380 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 ...
2
votes
5answers
165 views

Closest file match?

I am looking for a way to compare a set of files against a given file with each comparison giving me a "closeness" metric. I should then be able to order based upon the metric to find the closest ...
47
votes
7answers
21k views

Difference between '\n' and '\r\n'

Yes yes, I am aware that '\n' writes a newline in UNIX while for Windows there is the two character sequence: '\r\n'. All this is very nice in theory, but my question is why? Why the carriage return ...
14
votes
7answers
2k views

Best way to handle delimited files

So typically a CSV file uses a comma and the return character as it's field and line delimiters. This runs into obvious problems with text which can contain both these characters. Obviously there ...