Вы находитесь на странице: 1из 4

HydroFS - User manual

James Forward

Contents
1 Requirements 2
1.1 Setting up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Understanding core concepts 2

3 HydroFS and its functions 3


3.1 Checking current path/bucket . . . . . . . . . . . . . . . . . . . . 3
3.2 Changing current path/bucket . . . . . . . . . . . . . . . . . . . 3
3.3 Writing a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.4 Reading a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.5 Getting all files in the current bucket . . . . . . . . . . . . . . . . 3
3.6 Copying a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.7 Get the whole file table . . . . . . . . . . . . . . . . . . . . . . . 4
3.8 Search files by buckets . . . . . . . . . . . . . . . . . . . . . . . . 4

1
1 Requirements
• At least a dual-core system, with at least 2GB RAM
• Custom-compiled bochs (with SMP and x86-64 support enabled)
• crosstool-ng

• HydrOS source code


• Erlang/OTP 19.1 or higher

1.1 Setting up
To set up HydroFS, firstly, compile the HydrOS operating system. This requires
the use of crosstool-ng, and the source code. Use crosstool-ng to target the
x86 64-unknown-elf architecture. This can be found on the GitHub for Xinu
OS.
Once this toolchain has been created, make sure to add it to the path. Then,
enter the HydrOS root directory, and type make sim2 (for dual core usage) or
make sim (for quad core usage). This will compile and run HydrOS in a bochs
environment. Please note that due to bochs’ emulation being entirely software,
the performance of HydrOS may be sluggish.

2 Understanding core concepts


Unlike a normal UNIX-based OS, where paths indicate which directory you are
currently manipulating, in HydrOS/HydroFS, paths are just strings which are
manipulated to simulate an organisational system. Directories do not actually
”exist” in the traditional sense. These paths are also used to search for files. If
you use macOS’ tagged system, think of the paths as being exactly like that,
except with the ability to mix those tags.

2
3 HydroFS and its functions
By default, HydrOS will boot to the terminal. You will currently be in the ”/”
(root) path.

3.1 Checking current path/bucket


fs:pwb() (Print Working Bucket)

This will check which bucket(s) you are currently in.

3.2 Changing current path/bucket


fs:cb(Bucket) (Change Bucket)

This will change the bucket which you are in to the one currently specified.
Like UNIX-based OSs ”cd” command, this takes both absolute and relative
paths. An absolute path will begin with a ”/”. A relative path will not, and
just append the input string to the current path (adding a ”/” delimiter at
the end, of course). Please note, this string must begin and end with double
quotes. Otherwise, HydrOS/Erlang will detect this as an atom rather than a
string. This may crash the OS.

3.3 Writing a file


fs:write(File, Filename)

This option will write the file to the specified filename. As above, please note
that only strings should be input for the filename. Otherwise, the system may
crash.

3.4 Reading a file


fs:read(Filename)

This option will read the file specified by the file name.

3.5 Getting all files in the current bucket


fs:ls() (LiSt)

This will list all files in the current bucket.

3
3.6 Copying a file
fs:cp(Filename, Bucket) (CoPy)

This option will copy the file referenced to the bucket referenced. This bucket
may be an absolute or relative path. Again, please only use strings for this
command!

3.7 Get the whole file table


fs:getfiletable()

This option will return the entire file table as a string containing records of
files.

3.8 Search files by buckets


fs:tagged([Taglist])

This option will return all files that match all the buckets specified in the tag
list.

Вам также может понравиться