Questions tagged [file-handling]
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.
172 questions
0 votes
2 answers
176 views
Scaling/microservices approach to reading files from same directory
My company receives files via SFTP. We currently have a service running on a timer that: polls the inbound directory moves files to an 'In Progress' directory processes files (queueing messages for ...
4 votes
5 answers
3k views
The best way to handle exceptions?
I have the following method, which needs to return a List, but exceptions might occur along the way, and I don't want to handle them in my application, mainly because I don't even know how to handle ...
2 votes
2 answers
122 views
How to Design a Secure Script for Conditional File Access Based on Time and API Conditions?
I want to create a secure script that grants access to files based on specific conditions. The access should be controlled by both time-based and API-based conditions. The script should only allow ...
0 votes
2 answers
176 views
Allow-Rendering-Prevent-Download Architecture
I am trying to devise a simple system that, with the use of tokens, allows a specific file to be rendered in the client's browser, yet prevents the user agent from being able to download the file. ...
2 votes
1 answer
108 views
What are some architectures and designs I could use to optimize the performance of file text data lookups?
I would like to write a program that essentially handles text data and metadata of files locally on a machine's filesystem. There is no need for any network activity. I am working with large ...
6 votes
3 answers
3k views
Checking if a file exists before writing. Always avoid, or sensible with the right use case?
There are few reliable absolutes in this world. One I have relied on is the idea that checking if a file exists before doing something with it just creates an unwanted race condition. Meaning between ...
0 votes
1 answer
97 views
Regrouping several application files into one
I am working on a C++ application which lets users work on projects. Each project consists of several files that should not be known / edited manually by the user. For that we currently use a folder ...
-1 votes
2 answers
1k views
Dealing with multiple application instances
I'm developing an application (Java & JavaFX) that writes/reads data (a file). The problem is I don't want to restrict user to run only one instance (of my app) at a time, as I really can't think ...