Crate sqsh_sys

Crate sqsh_sys 

Source

Structs§

SqshArchive
The Sqsh struct contains all information about the current sqsh session.
SqshCompressionOptions
SqshConfig
The SqshConfig struct contains all the configuration options for a sqsh session.
SqshDirectoryIterator
iterator/directory_iterator.c
SqshError
Error codes for sqsh.
SqshExportTable
table/export_table.c
SqshFile
SqshFileIterator
file/file_iterator.c
SqshFileReader
The file reader allows to read user defined byte ranges from a file inside of a SqshArchive.
SqshFileType
enum that represents the file type.
SqshFragmentTable
SqshGzipStrategies
definitions of gzip strategies
SqshIdTable
table/id_table.c
SqshInodeMap
SqshLz4Flags
definitions of lz4 flags
SqshLzoAlgorithm
definitions of Lzo algorithms
SqshMapManager
SqshMapper
mapper/mapper.c
SqshMemoryMapperImpl
The implementation of a memory mapper.
SqshPathResolver
tree/path_resolver.c
SqshSuperblock
archive/superblock_context.c
SqshSuperblockCompressionId
The compression used in the archive.
SqshSuperblockFlags
The flags used in the superblock.
SqshTable
table/table.c
SqshTrailingContext
archive/trailing_context.c
SqshTreeTraversal
SqshTreeTraversalState
The state of the tree traversal.
SqshTreeWalker
tree/walker.c
SqshXattrIterator
xattr/xattr_iterator.c
SqshXattrTable
SqshXattrType
The type of an external attribute.
SqshXzFilters
definitions xz filters

Constants§

SQSH_INODE_NO_FRAGMENT
SQSH_INODE_NO_XATTR

Statics§

sqsh_mapper_impl_curl
a mapper that uses curl to download the file.
sqsh_mapper_impl_mmap
a mapper that uses mmap to map the file into memory.
sqsh_mapper_impl_static
a mapper that uses a static buffer.

Functions§

sqsh_archive_close
Frees the resources used by a Sqsh instance.
sqsh_archive_config
sqsh_superblock returns the configuration object of the archive context.
sqsh_archive_export_table
Retrieves the export table of a Sqsh instance.
sqsh_archive_fragment_table
Retrieves the fragment table of a Sqsh instance.
sqsh_archive_id_table
Retrieves the id table of a Sqsh instance.
sqsh_archive_inode_map
Retrieves the export table of a Sqsh instance.
sqsh_archive_map_manager
sqsh_mapper returns the map manager to retrieve chunks of the archive file.
sqsh_archive_open
initializes a archive context in heap.
sqsh_archive_superblock
sqsh_superblock returns the superblock context.
sqsh_archive_xattr_table
Retrieves the xattr table of a Sqsh instance.
sqsh_close
cleans up an file context and frees the memory.
sqsh_compression_options_free
Frees a SqshCompressionOptions struct.
sqsh_compression_options_gzip_compression_level
returns the compression level of gzip
sqsh_compression_options_gzip_strategies
returns the compression strategy of gzip
sqsh_compression_options_gzip_window_size
returns the compression window size of gzip
sqsh_compression_options_lz4_flags
returns the flags of lz4
sqsh_compression_options_lz4_version
returns the version of lz4 used
sqsh_compression_options_lzo_algorithm
returns the algorithm of lzo
sqsh_compression_options_lzo_compression_level
returns the compression level of lzo
sqsh_compression_options_new
Initializes a SqshCompressionOptions struct.
sqsh_compression_options_size
returns the size of the compression options struct
sqsh_compression_options_xz_dictionary_size
returns the dictionary size of xz
sqsh_compression_options_xz_filters
returns the compression options of xz
sqsh_compression_options_zstd_compression_level
returns the compression level of zstd
sqsh_directory_iterator_file_type
Retrieves the inode type of the current entry.
sqsh_directory_iterator_free
Frees the resources used by a directory iterator.
sqsh_directory_iterator_inode
Retrieves the inode number of the current entry.
sqsh_directory_iterator_inode_numberDeprecated
Since 1.2.0. Use sqsh_directory_iterator_inode() instead.
sqsh_directory_iterator_inode_ref
Retrieves the inode reference of the current entry.
sqsh_directory_iterator_lookup
Looks up an entry by name.
sqsh_directory_iterator_nameDeprecated
Since 1.3.0. Use sqsh_directory_iterator_name2() instead.
sqsh_directory_iterator_name2
Retrieves the name of the current entry.
sqsh_directory_iterator_name_dup
creates a heap allocated copy of the name of the current entry.
sqsh_directory_iterator_name_sizeDeprecated
Since 1.3.0. Use sqsh_directory_iterator_name2() instead.
sqsh_directory_iterator_new
Allocates and initializes a new directory iterator.
sqsh_directory_iterator_next
Advances the iterator to the next entry.
sqsh_directory_iterator_open_file
Loads the inode of the current entry.
sqsh_easy_directory_list
retrieves the contents of a directory as a list of file names
sqsh_easy_directory_list_path
retrieves the contents of a directory as a list of file paths
sqsh_easy_file_content
retrieves the content of a file.
sqsh_easy_file_exists
checks if a file exists.
sqsh_easy_file_mtime
retrieves the modification time of a file.
sqsh_easy_file_permission
retrieves unix permissions of a file.
sqsh_easy_file_size
retrieves the size of a file.
sqsh_easy_tree_traversal
easy/traversal.c
sqsh_easy_xattr_get
retrieves the value of a xattr key of a file or directory.
sqsh_easy_xattr_keys
retrieves all xattr keys of a file or directory.
sqsh_error_str
Get the error message for the given error code.
sqsh_export_table_resolve_inode
Retrieves an element from the table.
sqsh_file_block_count
Getter for the amount of blocks of the file content. This is only internally used and will be used while retrieving the file content.
sqsh_file_block_is_compressed
Checks whether a certain block is compressed.
sqsh_file_block_size
Getter the size of a block of the file content. This is only internally used and will be used while retrieving the file content.
sqsh_file_blocks_start
Getter for the start block of the file content. This is only internally used and will be used while retrieving the file content.
sqsh_file_device_id
returns the device id of the device inode.
sqsh_file_directory_block_offsetDeprecated
Since 1.3.0. Use sqsh_file_directory_block_offset2() instead.
sqsh_file_directory_block_offset2
retrieve the directory block offset. This is only internally used and will be used while iterating over the directory entries.
sqsh_file_directory_block_start
retrieve the directory block start. This is only internally used and will be used while iterating over the directory entries.
sqsh_file_directory_parent_inode
retrieve the parent inode of the directory.
sqsh_file_fragment_block_index
retrieve the fragment block index. This is only internally used
sqsh_file_fragment_block_offset
retrieve the fragment block offset. This is only internally used and will be used while retrieving the file content.
sqsh_file_gid
returns the owner group id of the file.
sqsh_file_hard_link_count
Getter for the inode hard link count.
sqsh_file_has_fragment
returns true if the file has a fragment block.
sqsh_file_inode
Getter for the inode number.
sqsh_file_inode_ref
returns the inode reference to this file.
sqsh_file_is_extended
returns whether the file is an extended structure.
sqsh_file_iterator_block_size
Returns the block size of the file iterator.
sqsh_file_iterator_data
Gets a pointer to the current data in the file iterator.
sqsh_file_iterator_free
Frees the resources used by a SqshFileIterator struct.
sqsh_file_iterator_new
Creates a new SqshFileIterator struct and initializes it.
sqsh_file_iterator_next
Reads a certain amount of data from the file iterator.
sqsh_file_iterator_size
Gets the size of the data currently in the file iterator.
sqsh_file_iterator_skip
Skips blocks until the block containing the offset is reached. Note that calling this function will invalidate the data pointer returned by sqsh_file_iterator_data().
sqsh_file_modified_time
Getter for the file modification time in seconds since epoch.
sqsh_file_permission
Getter for the permissions of the file.
sqsh_file_reader_advance
Advances the file reader by a certain amount of data and presents size bytes of data to the user.
sqsh_file_reader_data
Gets a pointer to the current data in the file reader.
sqsh_file_reader_free
Cleans up resources used by a SqshFileReader struct.
sqsh_file_reader_new
Initializes a SqshFileReader struct.
sqsh_file_reader_size
Gets the size of the current data in the file reader.
sqsh_file_size
Getter for the file size. 0 if the file has no size.
sqsh_file_symlink
returns the target of a symbolic link. Be aware that the returned value is not zero terminated.
sqsh_file_symlink_dup
creates a heap allocated copy of the target of a symbolic link.
sqsh_file_symlink_resolve
resolves the symlink target. After calling this function the file is in place changed to the target of the symlink.
sqsh_file_symlink_resolve_all
resolves all symlink target targets until a file is hit. This function is similar to sqsh_file_symlink_resolve() but resolves symlinks recursively until a file is hit.
sqsh_file_symlink_size
returns the length of the target of a symbolic link in bytes.
sqsh_file_to_stream
writes data to a file descriptor.
sqsh_file_type
returns the type of the file.
sqsh_file_uid
returns the owner user id of the file.
sqsh_file_xattr_index
returns index of the extended attribute inside of the xattr table.
sqsh_id_table_get
Retrieves an element from the table.
sqsh_inode_map_getDeprecated
Since 1.2.0. Use sqsh_inode_map_get2() instead.
sqsh_inode_map_get2
Gets the inode reference for a given inode number.
sqsh_inode_map_setDeprecated
Since 1.2.0. Use sqsh_inode_map_set2() instead.
sqsh_inode_map_set2
Sets the inode reference for a given inode number.
sqsh_lopen
Initialize the file context from a path. This function is identical to sqsh_open() but if the path is a symlink, the symlink target not resolved.
sqsh_mapper_block_size
INTERNAL API
sqsh_mapper_set_user_data
Sets the user data for a mapper.
sqsh_mapper_size
INTERNAL API
sqsh_mapper_user_data
Retrieves the user data from a mapper.
sqsh_open
Initialize the file context from a path.
sqsh_open_by_ref
Initializes a file context in heap
sqsh_path_resolver_dir_inode
Returns the inode of the current working directory.
sqsh_path_resolver_down
Lets the walker enter the current entry.
sqsh_path_resolver_free
Cleans up resources used by a SqshPathResolver struct.
sqsh_path_resolver_inode_ref
Returns the inode reference of the current entry.
sqsh_path_resolver_lookup
Looks up an entry in the current directory.
sqsh_path_resolver_name
Returns the name of the current entry. This entry is not zero terminated.
sqsh_path_resolver_name_dup
creates a heap allocated copy of the name of the current entry.
sqsh_path_resolver_name_size
Returns the size of the name of the current entry.
sqsh_path_resolver_new
Creates a new SqshPathResolver object at the root inode.
sqsh_path_resolver_next
Moves the walker to the next entry int the current directory.
sqsh_path_resolver_open_file
Returns the inode of the current entry.
sqsh_path_resolver_resolve
Resolve a path with the tree walker.
sqsh_path_resolver_revert
reverts the walker to the begining of the current directory.
sqsh_path_resolver_to_root
Moves the walker to the root directory.
sqsh_path_resolver_type
Returns the inode type of the current entry.
sqsh_path_resolver_up
Moves the walker one level up
sqsh_perror
Print the error message for the given error code.
sqsh_superblock_block_size
Retrieves the block size of a superblock context.
sqsh_superblock_bytes_used
Retrieves the number of bytes used in a superblock context.
sqsh_superblock_compression_id
Retrieves the compression id of a superblock context.
sqsh_superblock_directory_table_start
Retrieves the start offset of the directory table in a superblock context.
sqsh_superblock_export_table_start
Retrieves the start offset of the export table in an archive.
sqsh_superblock_fragment_entry_count
Retrieves the number of fragment entries in a superblock context.
sqsh_superblock_fragment_table_start
Retrieves the start offset of the fragment table in a superblock context.
sqsh_superblock_has_compression_options
Checks if a superblock context has compression options.
sqsh_superblock_has_export_table
Checks if a superblock context has an export table.
sqsh_superblock_has_fragments
Checks if a superblock context has fragment table.
sqsh_superblock_has_xattr_table
Checks if a superblock context has an xattr table.
sqsh_superblock_id_count
Retrieves the number of ids in an archive.
sqsh_superblock_id_table_start
Retrieves the start offset of the id table in an archive.
sqsh_superblock_inode_count
Retrieves the number of inodes in an archive.
sqsh_superblock_inode_root_ref
Retrieves the reference of the root inode in a superblock context.
sqsh_superblock_inode_table_start
Retrieves the start offset of the inode table in an archive.
sqsh_superblock_modification_time
Retrieves the modification time of a superblock context.
sqsh_superblock_version_major
Retrieves the major version of an archive.
sqsh_superblock_version_minor
Retrieves the minor version of an archive.
sqsh_superblock_xattr_id_table_start
Retrieves the start offset of the xattr id table in an archive.
sqsh_table_get
Retrieves an element from the table.
sqsh_trailing_data
Retrieves the trailing data in a context.
sqsh_trailing_size
Retrieves the size of the trailing data in a context.
sqsh_tree_traversal_depth
Returns the path segment at a given index.
sqsh_tree_traversal_free
Arguments
sqsh_tree_traversal_iterator
Gets the underlying directory iterator pointing to the current entry.
sqsh_tree_traversal_name
Returns the name of the current entry. This entry is not zero terminated. The function will return an emptry string for the uppermost object.
sqsh_tree_traversal_name_dup
creates a heap allocated copy of the name of the current entry.
sqsh_tree_traversal_new
Creates a new SqshTreeTraversal object at the root inode.
sqsh_tree_traversal_next
Moves the traversal to the next entry int the current directory.
sqsh_tree_traversal_open_file
Returns the inode of the current entry.
sqsh_tree_traversal_path_dup
Returns the name of the current entry. This entry is not zero terminated.
sqsh_tree_traversal_path_segment
Returns the length of the path segment at a given index.
sqsh_tree_traversal_set_max_depth
Sets the maximum depth of the traversal.
sqsh_tree_traversal_state
returns the state of the traversal.
sqsh_tree_traversal_type
Returns the inode type of the current entry.
sqsh_tree_walker_downDeprecated
Since 1.2.0. Use sqsh_path_resolver_down() instead. Lets the walker enter the current entry.
sqsh_tree_walker_freeDeprecated
Since 1.2.0. Use sqsh_path_resolver_free() instead. Cleans up resources used by a SqshTreeWalker struct.
sqsh_tree_walker_lookupDeprecated
Since 1.2.0. Use sqsh_path_resolver_lookup() instead. Looks up an entry in the current directory.
sqsh_tree_walker_nameDeprecated
Since 1.2.0. Use sqsh_path_resolver_name() instead. Returns the name of the current entry. This entry is not zero terminated.
sqsh_tree_walker_name_dupDeprecated
Since 1.2.0. Use sqsh_path_resolver_name_dup() instead.
sqsh_tree_walker_name_sizeDeprecated
Since 1.2.0. Use sqsh_path_resolver_name_size() instead.
sqsh_tree_walker_newDeprecated
Since 1.2.0. Use sqsh_path_resolver_new() instead. Creates a new SqshTreeWalker object at the root inode.
sqsh_tree_walker_nextDeprecated
Since 1.2.0. Use sqsh_path_resolver_next() instead.
sqsh_tree_walker_open_fileDeprecated
Since 1.2.0. Use sqsh_path_resolver_open_file() instead. Returns the inode of the current entry.
sqsh_tree_walker_resolveDeprecated
Since 1.2.0. Use sqsh_path_resolver_open_file() instead.
sqsh_tree_walker_revertDeprecated
Since 1.2.0. Use sqsh_path_resolver_revert() instead. reverts the walker to the begining of the current directory.
sqsh_tree_walker_to_rootDeprecated
Since 1.2.0. Use sqsh_path_resolver_to_root() instead. Moves the walker to the root directory.
sqsh_tree_walker_typeDeprecated
Since 1.2.0. Use sqsh_path_resolver_type() instead. Returns the inode type of the current entry.
sqsh_tree_walker_upDeprecated
Since 1.2.0. Use sqsh_path_resolver_up() instead. Moves the walker one level up
sqsh_xattr_iterator_free
Frees the resources used by an xattr iterator.
sqsh_xattr_iterator_fullname_cmp
Compares the full name of the current xattr with a given 0-terminated name.
sqsh_xattr_iterator_fullname_dup
creates a heap allocated copy of the full name of the current entry.
sqsh_xattr_iterator_is_indirect
Checks if the current xattr is indirect.
sqsh_xattr_iterator_lookup
Looks up an xattr by name.
sqsh_xattr_iterator_name
Retrieves the name of the current xattr excluding the prefix.
sqsh_xattr_iterator_name_size
Retrieves the size of the name of the current xattr.
sqsh_xattr_iterator_new
Allocates and initializes a new xattr iterator.
sqsh_xattr_iterator_next
Advances the iterator to the next xattr.
sqsh_xattr_iterator_prefix
Retrieves the prefix of the current xattr.
sqsh_xattr_iterator_prefix_size
Retrieves the size of the prefix of the current xattr.
sqsh_xattr_iterator_type
Retrieves the type of the current xattr.
sqsh_xattr_iterator_value
Retrieves the value of the current xattr.
sqsh_xattr_iterator_value_dup
creates a heap allocated copy of the value of the current entry.
sqsh_xattr_iterator_value_sizeDeprecated
Retrieves the size of the value of the current xattr. Since 1.3.0. Use sqsh_xattr_iterator_value_size2() instead.
sqsh_xattr_iterator_value_size2
Retrieves the size of the value of the current xattr.

Type Aliases§

sqsh_index_t
typedef used for indexing