Questions tagged [filesystems]

A file system is a way of organizing data on a computer system. Typically a file system consists of files, folders (normally a special kind of file) and an API that can be used for interacting with files.

File Systems (or filesystems)

A file system is the specification of how files in a computer should be logically stored, named and organized. File systems present to users a human-readable format of data organization in the computer, where each file is a discrete unit of data.

File systems present only a logical format. They don't necessarily reflect the way the data is physically stored on a computer disk drive, or other storage device. Since the computer actually stores data in bits, data on a storage device lacks any structure; consisting of nothing more than a series of 1s and 0s.

File systems therefore give structure and meaning to that data, by — at the very minimum — giving an arbitrary collection of bits a file name and maintaining a record of this file physical location on the storage device.

Common Elements

Other than file names, common file systems also describe and maintain directories and file attributes, which serve as a means to further structure data organization and to give files specific purposes, security features or functionality.

File systems usually store this information in table-like format in a specific region of the storage device. Each file is listed on this table with its location, length and other properties clearly declared. An operating system that understands the filesystem format can then read this table to access a file in order to edit, rename, delete, move or alter any of its attributes.

For more reading

File System, at Wikipedia

Various file system specifications

9576 questions
4
votes
1 answer

Node.js - Properly closing fd with multiple streams

I am creating an append/rw file (depending if the download is resumed or not) this.syncFile = await fs.promises.open(this.syncPath, 'a+'); this.syncFile = await fs.promises.open(this.syncPath, 'r+'); later I create a write stream for that FD let…
n00b
  • 5,642
  • 2
  • 30
  • 48
4
votes
1 answer

What are the inherent security vulnerabilities in the header?

The Google C++ style guide section "Other C++ features" contains the following: In addition to what's described in the rest of the style guide, the following C++ features may not be used: Compile-time rational numbers (), because of…
user9723177
4
votes
4 answers

Windows File system API to query large files

I have HDD (say 1TB) with FAT32 and NTFS partitions and I dont have information on which all files are stored on it, but when needed I want to quickly access large files say over 500 MB. I dont want to scan my whole HDD since it is very time…
Nitin Chaudhari
  • 1,497
  • 16
  • 39
4
votes
2 answers

How do I get the child folder name of the path besides these methods?

Of the given path like "level1/level2/level3/", I'd like pass it through some operation and get the result like "level3/". So I made two trials like these: TRIAL 1: After finding parent property within the Path object, I looked for something close…
Kiran Racherla
  • 219
  • 3
  • 12
4
votes
1 answer

How to create files which share an extent?

The Linux programmer's manual manpage fallocate(2) states: If the FALLOC_FL_UNSHARE flag is specified in mode, shared file data extents will be made private to the file to guarantee that a subsequent write will not fail due to lack of space.…
Alexander Klauer
  • 957
  • 11
  • 18
4
votes
2 answers

How can I make symlinks made from inside docker linux containers to be seen from a windows host (maybe involving samba, if needed)

Question How can I see symlinks of docker linux-containers from a windows host? (Even if I have to place an intermediate linux machine exposing the filesystem via NFS or Samba) Context In a DEVEL environment, I have this structure in a certain…
Xavi Montero
  • 9,239
  • 7
  • 57
  • 79
4
votes
1 answer

Does Java need to support ERROR_NO_MORE_FILES when canonicalizing paths on Windows?

The problem. Some daemon implemented in Java, running on Windows 7, copies files from one directory into another, while both source and target directory are a network share hosted by Windows Server 2016. Copying is done using Apache Commons IO and…
Thorsten Schöning
  • 3,501
  • 2
  • 25
  • 46
4
votes
1 answer

node.js Write file with directories?

If I use fs.writeFile I get: Error: ENOENT, No such file or directory I think that's because the directories that houses the file doesn't exist. Am I supposed to use fs.mkdir first or is there something else? Thanks.
Harry
  • 52,711
  • 71
  • 177
  • 261
4
votes
1 answer

fs.stat birthtime/birthtimeMs in Linux and MacOS

One of the properties of the fs.Stats object that is returned when one calls fs.stat is birthtime and birthtimeMs, which I'm assuming is when the file was created. Stats { dev: 2114, ino: 48064969, mode: 33188, nlink: 1, uid: 85, gid:…
oldboy
  • 5,729
  • 6
  • 38
  • 86
4
votes
1 answer

Need info regarding java.io.UnixFileSystem.getspace method, which unix command is executed?

Our Spring boot application hanged on production Unix environment. After getting the thread dump we were able to find that getSpace method of UnixFileSystem was locked. Can anyone help me with the Unix command that is called when java calls the…
Atul Rai
  • 171
  • 2
  • 4
4
votes
0 answers

Mac OS Mojave: "Your disk is almost full" message - "System" occupying tons of space

I recently upgraded the OS of a mid-2012 MacBook Pro to Mojave. Things were fine for a while, but now start-up takes forever, the OS is very sluggish, and I keep getting the message "Your disk is almost full". I assume the slowness is a result of…
mahdaeng
  • 791
  • 4
  • 15
  • 25
4
votes
1 answer

python3 pathlib mkdir Permission denied

This code raised exception when I tried to create a sub dir ./test/123 under ./test/. And after examine the permission, I found that dir ./test created by this code has d-w----r--, which is strange...If I mkdir in the terminal, that dir will have…
Ziqi Liu
  • 2,931
  • 5
  • 31
  • 64
4
votes
1 answer

How to Trash items that are not owned by the current user, the same way the Finder does?

I am writing a tool that offers the option to trash selected items (files, folders). Usually, I'd call -[NSFileManager trashItemAtURL:...] for each of those items, as it's also explained in this and in this SO question. However, these do not work…
Thomas Tempelmann
  • 11,045
  • 8
  • 74
  • 149
4
votes
0 answers

Which OS support an efficient file system write barrier?

Do file system or disk drivers support a concept of file system modification fence, like a memory fence in the CPU or shared memory system? A fence is an instruction that separate memory operations such that globally visible memory accesses after…
curiousguy
  • 8,038
  • 2
  • 40
  • 58
4
votes
4 answers

Moving up a directory

I'm creating a directory in a php script, moving into that directory and doing some stuff. This part works fine. Now, I want to move out of this directory and delete it. Any pointers on how to do this? I have tried moving up 1 level, but it doesnt…
Akash
  • 1,716
  • 2
  • 23
  • 43