Skip to main content

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.

2 votes
2 answers
99 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 ...
edge selcuk's user avatar
10 votes
8 answers
6k views

What is the advantage of log file rotation based on file size?

I understand that log file rotation is changing the log file you used when (1) one gets big enough or (2) at EOD, but I'm not sure I understand the reason for (1). I have never had any issues with ...
user129393192's user avatar
0 votes
2 answers
149 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. ...
oldboy's user avatar
  • 103
0 votes
5 answers
219 views

Load and process (compressed) data from filesystem in the blink of an eye

We have a huge amount of queries hitting our API that request a minor or major extract of some huge files lying around on our mounted hard drives. The data needs to be extracted from the files and ...
glades's user avatar
  • 419
2 votes
1 answer
94 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 ...
the_endian's user avatar
  • 1,152
0 votes
3 answers
713 views

Folder structure to store image/file uploads

I'm working on a system and we need to do some refactoring on the upload service, that handles all files and images uploads to the system. Nothing fancy, but I it got me thinking about the folder ...
celsomtrindade's user avatar
6 votes
3 answers
2k 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 ...
candied_orange's user avatar
0 votes
1 answer
147 views

Selecting the endianness of data in files generated by an embedded system

I have an embedded system running on a little-endian Cortex-M3. This system is able to accept packets from the network and reply to them. Now, I would like the system to start generating files. These ...
9a3eedi's user avatar
  • 2,109
0 votes
1 answer
76 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 ...
f222's user avatar
  • 1,040
1 vote
1 answer
92 views

How best to keep Excel Workbook field in sync across class instances

I know almost nothing about threads, synchronization, ... That being said, I am working on a record handler, that hits Excel sheet to pull/push data. There exist, in my code base, a BaseRecordHandler, ...
Mike Warren's user avatar
-1 votes
2 answers
872 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 ...
Wiktor's user avatar
  • 33
0 votes
2 answers
99 views

Transferring data from 1 web app into another offline

I have a web app that will be used locally on 2 different site. The program is a Vue web app made with node.js and express, using MySQL database. Due to limitation (no internet in site 1), there is no ...
Aditya D.'s user avatar
1 vote
1 answer
1k views

How does resuming downloads work?

I have seen download managers manage to resume HTTP downloads from where they stopped. How are they able to resume downloads? Is it related to the Accept-Range Header? Or are there other mechanisms ...
Vipin Menon's user avatar
0 votes
1 answer
420 views

Efficient way to separate text file to header, tail lines and the leftover in between

I'm looking for a more efficient algorithm for the following problem: The input of the algorithm is a text file and two non-negative integer numbers - the number of headers and the number of tails. ...
kanbagoly's user avatar
  • 111
0 votes
1 answer
815 views

Constantly writing a JSON file [closed]

I need to write continuously into a JSON file in C++. The format and structure are defined as requirement. The data is produced in the process itself and needs to be stored multiple times per second. ...
da-chiller's user avatar

15 30 50 per page
1
2 3 4 5
12