ryanavella / filesystem-kind-rs Goto Github PK
View Code? Open in Web Editor NEWQuery the kind of filesystem that a file resides on
License: Apache License 2.0
Query the kind of filesystem that a file resides on
License: Apache License 2.0
Unlike FreeBSD, Linux doesn't have a f_fstypename
field on struct statfs
. However, it does provide a f_type
field that contains a magic number corresponding to each filesystem. The full list of magic numbers resides in /usr/include/linux/magic.h
, and they are also available in the libc crate, so this could possibly be done with a few tweaks to the FreeBSD code.
On the surface it looks like OpenBSD and FreeBSD could share the same code, but I don't have a way to test this at the moment.
Right now, some filesystems end in "fs," while others do not. Should we favor consistency, or should we try to stick to the common renderings? Right now I try my best to match the name as it is shown on Wikipedia, but abiding by the typical Rust convention of not capitalizing each letter in an enum if it is part of an acronym.
Should we classify e.g. linprocfs
differently than procfs
? As far as I can tell, both filesystems can be mounted on FreeBSD and it is possible to distinguish between the two, although the latter appears to be deprecated.
On the surface it looks like NetBSD and FreeBSD could share the same code, but I don't have a way to test this at the moment.
On the surface it looks like macOS and FreeBSD could share the same code, but I don't have a way to test this at the moment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.