Specifications

ioctl()
isatty()
kill()
lseek()
open()
read()
sbrk()
settimeofday()
stat()
usleep()
wait()
write()
The most commonly used functions are those that relate to file I/O.
For more information, refer to the “File System” chapter.
For more information about the use of these functions, refer to the "HAL API Reference" chapter.
Related Information
File System on page 6-5
HAL API Reference on page 14-1
File System
The HAL provides infrastructure for UNIX-style file access. You can use this infrastructure to build a file
system on any storage devices available in your hardware.
For more information, refer to an example in the "Read-Only Zip File System" chapter.
You can access files in a HAL-based file system by using either the C standard library file I/O functions in
the newlib C library (for example fopen(), fclose(), and fread()), or using the UNIX-style file I/O
provided by the HAL.
The HAL provides the following UNIX-style functions for file manipulation:
close()
fstat()
ioctl()
isatty()
lseek()
open()
read()
stat()
write()
For more information about these functions, refer to the "HAL API Reference" chapter.
The HAL registers a file subsystem as a mount point in the global HAL file system. Attempts to access files
below that mount point are directed to the file subsystem. For example, if a read-only zip file subsystem
(zipfs) is mounted as /mount/zipfs0, the zipfs file subsystem handles calls to fopen() for /mount/zipfs0/
myfile.
There is no concept of a current directory. Software must access all files using absolute paths.
NII5V2
2015.05.14
File System
6-5
Developing Programs Using the Hardware Abstraction Layer
Altera Corporation
Send Feedback