Questions tagged [files]
The files tag has no summary.
64 questions
0
votes
2
answers
653
views
How does the MVC pattern actually work?
I’m still a Computer Science student, and recently I’ve had to develop a project using the MVC pattern, but without having learned in depth about how it actually works. And it’s not the first time I’...
0
votes
2
answers
218
views
How might encapsulated source be broken into into multiple files?
I have a project where there is a primary, high-level, opaque struct with many functions that operate on it. Maybe I am simulating a CPU.
How might the corresponding source code be organized?
One way ...
0
votes
2
answers
1k
views
Best practice for storing a static pdf file in a web app
I've to store a static pdf with an user guide of my application.
I'm using Spring boot and Angular 12, what is the best way to store it?
Put the file on resource folder of Spring boot?
Put the file ...
0
votes
2
answers
1k
views
Move from mft to api REST style to get or post large data 200mb , is it best practice?
I am designing the API architecture for my client:
My client actually exchange huge files (csv) with his Partner with MFT ( SFTP )
**Partner ==> MFT ==> Client **
The requirement is to move to ...
2
votes
1
answer
669
views
Should a Web Application File URL Have Public or Private Access
I am debating whether to give my files a public url or a limited private one.
I am hosting various files for a mobile/web application. These will include product images and videos. Currently only ...
-1
votes
2
answers
144
views
Is there a paradigm for working with data semantically instead of file-based?
I am looking for a name/paradigm/research area etc. that describes the notion of working with data not in the traditional file-based sense, but instead based on semantics. I can best explain what I am ...
0
votes
2
answers
278
views
Inheritance: Folders and Files & Liskov Substitution Principle
Based on what I have been reading about the Liskov Substitution Principle, I understand that a square and rectangle class cannot be a part of the same inheritance tree.
I would like to apply these ...
1
vote
0
answers
51
views
The most reliable way to deliver data to external storages
I have a question about best-practices in terms of reliability.
There is some data residing in RAM of some process and the data needs to be delivered in a bunch of external storage providing the ...
0
votes
1
answer
150
views
Is my understanding of modern IDEs autosave feature naive? [duplicate]
Long time ago I learned that text files are not like Random access Files, i. e., adding or updating info at the beginning of a text file involves moving all the rest of the file "forward" (or ...
1
vote
1
answer
249
views
Should I place constants related to reading a specific type of file in the FileReader class or in a separate class?
I am writing a class FileFoodReader (in java if that matters) that reads input from a file containing information about foods and their nutritional values. The file has to fulfill some requirements ...
0
votes
3
answers
398
views
How to append a chunk of fixed size data to a file and make sure this chunk doesn't get fragmented on disk?
So i want to understand how DBMS implementation works
To give an example :
MySQL implements each tables with its own pages, which are 16KB
so each table is a file, and is a multiple of 16KB, ...
6
votes
6
answers
721
views
Is duplicating files to avoid programming branching a good or anti pattern?
for example, suppose I need to play different sounds according to "grade":
file list:
fairSound.mp3
goodSound.mp3
excellentSound.mp3
code:
showResult(grade){
if(grade==0 || grade==1){
...
4
votes
4
answers
2k
views
Why do disks write data in chunks of page size?
In my understanding, even if i want to overwrite a byte in middle of a file, OS and/or disk will read the content of the size of page, modify one byte and then write the contents back.
What is the ...
-1
votes
1
answer
491
views
Standard for config file location? [duplicate]
My program (a command-line utility) will load configuration from a file, using defaults if file not found, and I'd like to do this in a cross-platform manner that people will expect.
Is there a de-...
3
votes
1
answer
610
views
What's the best approach for using Git for a project containing a largish binary database (4 GB, 4000 files)?
The codebase consists of 190 Fortran 95+ source files, and directory of binary coefficient files required for the use of the code. The binary directory contains about 4000 files, some of which are ...
2
votes
3
answers
608
views
Why would I use a queue to list all files and subfolders recursively
In Robert Sedgewick's Algorithms book there's this exercise:
A folder is a list of files and folders. Write a program that takes
the name of a folder as a command-line argument and prints out all ...
1
vote
2
answers
569
views
Best approach to persist settings in files
I am in the process of migrating the way an app makes persistence of its settings.
It wrote and read data from registry;
now it is desired it load/save XML files on the C:\AppData\MyApp\Version ...
0
votes
1
answer
504
views
Find Randomized Sequence Seed To Compress files statistically
I was wondering if what I have in mind already exists in any known compression programs/algorithms or not. We know that Seed gives us constant sequence of random numbers. so if we be able to find seed ...
1
vote
0
answers
193
views
Is the readability of file list in IDE a reason to keep empty .cpp file?
Sometimes I just need .h but not .cpp file, eg : interface class or enum class, and when the class list is displayed on file list of IDE (eg:Xcode):
Animal.cpp
Animal.h
Cat.cpp
Cat.h
Dog.cpp
Dog.h
...
0
votes
1
answer
1k
views
File Transfer over Socket
I'm trying to build a simple file transfer program that transfers a file from a server to a client. I gave it a try myself by simply writing the file to an ObjectOutputStream. This didn't work. I did ...
27
votes
2
answers
7k
views
Why doesn't Git set the file time?
Git by default does not set the file-time accordingly when the files are synced with the origin. It just ignores the file-time of the pushed files.
Doesn't it make sense for the file's modification ...
0
votes
0
answers
489
views
Managing an index of file metadata on a network share
What is a good way of setting up a "shared index" of file metadata, when there can be no shared process such as a database server?
I'll explain the scenario: A server contains M (say 10000) large ...
3
votes
1
answer
5k
views
Project structure and folder naming
I have a cpp project which source code I want to split into 3 groups and want to define structure for these files by creating folders with nice name.
First group are files related to socket ...
26
votes
1
answer
7k
views
What is the name for the non-extension part of a filename? [closed]
Given the file path:
/some/path/abc.txt
The filename is "abc.txt", and extension is "txt".
What is the "industry standard", unambiguous name for the "abc" part?
For reference, in both java's older ...
-1
votes
1
answer
378
views
How do you create a Composite file in C++ [closed]
I am looking to create a "Composite file" in C++, basically a composite file is a file containing files, (examples: .docx, .jar, etc) these files can usually be renamed as .zip and opened with a .zip ...
4
votes
2
answers
2k
views
Where to store many files?
I have 500.000 files with the combined size of 350GB. So an average file has 0.7MB size. Each file has metadata: 1 to 100 keywords and optionally a short description. I need to filter the files and ...
-1
votes
1
answer
1k
views
Uploading large files to web-server even if browser closed
I need to permit users to upload large files to my web-server even if the browser is closed. How can I implement this functionality. I have gone through the feasibility of google drive app but it dose'...
0
votes
1
answer
3k
views
Find if certain files have been added or removed in large directory structure
I have a larger directory structure (dir + sub directories) with files. It contains files of certain types. For one particular type (let's say with appendix .foo) I need to figure out if files have ...
6
votes
1
answer
160
views
Optimizing a file type for compare tools
Context:
I am developing a visual studio plugin that generates layer diagrams.
I want the tool to be able to produce an intermediate output, which is the data representation of what is being rendered ...
2
votes
1
answer
887
views
What mechanism/protocol transmits non-HTML files when downloaded from the web?
When a non-HTML file such as a PDF, DOCX, EXE, etc is made public to the WWW by an HTTP server, and a client makes a request for said file,
www.example.com/download?=test.doc
what facilitates the ...
191
votes
15
answers
40k
views
Why are the sizes of programs so large?
If we look at the vintage program Netscape Navigator or an early version of Microsoft Word, those programs were less than 50 MB in size. Now when I install google chrome it is 200 MB and desktop ...
0
votes
1
answer
2k
views
Improving performance with caching of files in C# [closed]
EDIT: You were right, the problem is not checking if a file with the same name exists but the connection. I made a mistake measuring the time with StopWatch and included a part which used the network ...
2
votes
3
answers
823
views
long (or bizarre) file paths
I know that (on Linux at least, with native file systems like Ext3) file paths can in theory be quite long, and PATH_MAX is often (but not always) as big as 4096 (see this; and this explains it could ...
5
votes
2
answers
13k
views
Move Files Using Git mv Or Use File System Instead
I am wondering what the difference in Git would be if I used the mv command versus moving it in Windows explorer. From Perforce I know it's important because the version system keep track of the file ...
0
votes
5
answers
3k
views
Do bare computer systems (without OS installed) use (executable) files? [duplicate]
As far as I read, files are introduced in OS books. Before an OS is installed on a bare computer system, does the computer use files?
In particular, executable files have formats in OSes, e.g. ...
4
votes
2
answers
4k
views
Should log/data files be stored in the database? [duplicate]
I'm working on a project where we produce lots of data in the form of simple .txt files. These usually contain a set of columns that will later be loaded in to Matlab to be analysed. I've implemented ...
2
votes
2
answers
14k
views
At what point should you start putting functions in a new file? [closed]
I'm currently writing a python script. It's currently about 400 lines long, and it seems like it's getting a bit long, as when I'm trying to scroll through it with eclipse it takes a bit to get from ...
-1
votes
2
answers
8k
views
Way for java program to read file from when it was stopped
I am working on an application that reads a log file, looks for a specific string, sends alert emails and saves data from the file into a database. The reading functionality is working well, but I am ...
1
vote
3
answers
728
views
Why do we need a format for binary executable files
When binary files (i.e. executables) are saved they usually have a format (e.g. ELF or .out) where we have a header containing pointers to where data or code is stored inside the file. But why don't ...
14
votes
7
answers
6k
views
Why can we not insert into files without the additional writes? (I neither mean append, nor over-write)
This occurs as a programming language independent problem to me.
I have a file with the content
aaabddd
When I want to insert C behind b then my code needs to rewrite ddd to get
aaabCddd
Why can I ...
17
votes
2
answers
10k
views
Version number as a part of a file name
I see that some software have the version number included as a part of their file name, while others do not. I am more used to the latter type, and I think that is more popular, but I see the former ...
0
votes
2
answers
1k
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 ...
1
vote
1
answer
101
views
Many JS files included, one breaks all, smart approach to fix? [closed]
I'm doing a project that uses svg-edit(JS drawing tool) and the page grows big. By now there are about 20 JS file in a page - plug-ins and so on.
One of the editor's files breaks in some kind of '...
11
votes
3
answers
2k
views
Should I store test files in source control?
I have a number of (large) test files that need to be maintained. This means access to their history is a requirement.
Benefits
Any new developers get the entire test suite with just a git pull.
The ...
5
votes
5
answers
679
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 ...
4
votes
5
answers
1k
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 dictionary,...
1
vote
3
answers
2k
views
Why do CSV file formats normally use quoting instead of escaping?
There are a lot of variants of the CSV "standard" (or lack thereof). I've never personally see any that use an escape character (like \) instead of surrounding each field with double quotes. Instead ...
7
votes
5
answers
13k
views
What is the optimal algorithm for estimating number of lines of text in a file?
Given a file > 5Gb, simply with lines like Apache's access.log.
I need to get number of lines.
Any constructions like
file(filename).read().counter('\n')
would read all of the file and it would ...
1
vote
2
answers
6k
views
All images in one folder for a website?
When creating websites, is it better to have a lot of images in one folder, or have them separated?
It's something that has always been in my mind but I never researched enough about it, and googling ...
1
vote
1
answer
1k
views
Watching file changes/additions/removal, but with an eye on partial transfer
I would like to monitor the filesystem in python, so that my application gets warned of the new file addition, file removal, or file change. Once the file is detected, the application starts ...