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
3 answers

Is there a counterpart of Mac OS-X filesystem bundles on Windows?

What I need is a directory which the user can handle as a single file in the Windows explorer. Does something like this exist? If not, what comes closest?
S. Franke
  • 41
  • 1
4
votes
1 answer

race-free directory walk (C++)

I need to walk a directory tree and get stat values for every file. I want to do this safely while the filesystem is being modified. In Python, the best option is os.fwalk, which gives access to the fd for the directory being traversed; I can then…
Gabriel
  • 1,262
  • 12
  • 12
4
votes
2 answers

Check if file path is block device in Python

I have some file path in Python under Linux and I need to figure out if it's a block device - representation of disk or partition. This information is visible when typing ls -l, e.g. brw-rw---- 1 root disk 8, 1 09-12 18:01 /dev/sda1 I mean letter b…
asad128
  • 85
  • 1
  • 8
4
votes
1 answer

Linux filesystem benchmarking best practices

(Not really a programming question, sorry) I'm working on benchmarking various filesystems (most importantly: ext3) with various filesystem options (for instance: noatime, relatime etc.) for specific situations on a Linux box. For raw filesystem…
wzzrd
  • 610
  • 4
  • 13
4
votes
3 answers

How to delete the file while removing the IOS app?

I have specific requirement in mobile application for file storage. I am creating one file to store some data into it and that data will be retrieved later. In Android if I store the file in below location, then file will be deleted while removing…
ChiranjeeviIT
  • 529
  • 1
  • 4
  • 17
4
votes
1 answer

FUSE open system call mechanism

When calling to the open system call from a program, to create an empty file (with O_WRONLY | O_CREAT | O_TRUNC) in a FUSE managed directory, the following functions from my FUSE file system implementation are executed: getattr (returns error…
Bilk
  • 418
  • 6
  • 19
4
votes
1 answer

chmod() and chown() of a symlink file in PHP

Are there PHP commands to change file access permissions/owner of a symlink file as opposed to those of the object the symlink points to? From the shell I can $ mkdir adir $ ln -s adir alink $ chmod 0700 alink -- changes permissions of…
user213154
4
votes
3 answers

Emulating/faking filesystem for testing C code?

I'm looking for the cross-platform way to test some features in my application which required access to the filesystem (to write and read binary data). In the real life my application running on Linux and store special data in /usr/local/etc…
bialix
  • 20,053
  • 8
  • 46
  • 63
4
votes
3 answers

How to get disk name programmatically in Linux(Like "/dev/sda" or "/dev/sdb")?

I am trying out to find information related to Disk and partitions. Following are my code. But problem is that, I am passing disk name through command line by querying disk name from "/proc/partitions". Is there any api which can give me disk name…
Ravi Bhushan
  • 253
  • 3
  • 17
4
votes
1 answer

Synchronizing a file system (syncfs) in Go

Is there a package that exports the syncfs function in Go? I'd like to synchronize a particular file system. I found the syscall package, but it only exports FSync, Fdatasync and Sync.
Petr
  • 62,528
  • 13
  • 153
  • 317
4
votes
2 answers

Unix directory structure: managing file name collision

Usually every time `make install' is run, files are not put in a specific directory like /usr/prog1. Instead, the files are put in directories where files from other programs are already in like /usr/lib and /usr/bin. I believe this has been a…
Tadeus Prastowo
  • 267
  • 2
  • 9
4
votes
2 answers

Toy OS Filesystem

I have developed a basic kernel in assembly/c that runs a basic terminal. I have set it up to run off of an iso with grub. I would like to continue this OS, but without a file system, I feel as if there's really nothing else I could do. After much…
Dylan Turner
  • 322
  • 1
  • 12
4
votes
1 answer

PowerShell New-Item output is inconsistent - Why?

I am getting different out for the same powershell command and I am not sure why. When this runs within a function, I get output 1 and when I run by itself I get output2 New-Item -Path C:\DEPL\nichdwww\deployments\Full\bob3 -type directory Output…
Barry MSIH
  • 3,525
  • 5
  • 32
  • 53
4
votes
2 answers

Trying to delete a directory and his hidden files in linux with php

From the command line when I use: rm -fr /path/dir/{*,.??*} I can delete all files in /path/dir including the hidden files, but when I try to make this from PHP with this code: system('rm -fr /path/dir/{*,.??*}') nothing happens. I can't find why…
Adrian Cid Almaguer
  • 7,815
  • 13
  • 41
  • 63
4
votes
4 answers

Way to get unique filename if specified filename already exists (.NET)

Is there a built in .NET function to get a unique filename if a filename already exists? So if I try and save MyDoc.doc and it already exists, the file will save with name MyDoc(1).doc, the same way a browser download works for example. If not, what…
fearofawhackplanet
  • 52,166
  • 53
  • 160
  • 253
1 2 3
99
100