Loading...
Searching...
No Matches
wimlib_dir_entry Struct Reference
Retrieving WIM information and directory listings

Structure passed to the wimlib_iterate_dir_tree() callback function. More...

`#include <wimlib.h>`

Collaboration diagram for wimlib_dir_entry:
[legend]

## Data Fields

const wimlib_tchar * | filename
| Name of the file, or NULL if this file is unnamed.
const wimlib_tchar * | dos_name
| 8.3 name (or "DOS name", or "short name") of this file; or NULL if this file has no such name.
const wimlib_tchar * | full_path
| Full path to this file within the image.
size_t | depth
| Depth of this directory entry, where 0 is the root, 1 is the root's children, ..., etc.
const char * | security_descriptor
| Pointer to the security descriptor for this file, in Windows SECURITY_DESCRIPTOR_RELATIVE format, or NULL if this file has no security descriptor.
size_t | security_descriptor_size
| Size of the above security descriptor, in bytes.
uint32_t | attributes
| File attributes, such as whether the file is a directory or not.
uint32_t | reparse_tag
| If the file is a reparse point (FILE_ATTRIBUTE_REPARSE_POINT set in the attributes), this will give the reparse tag.
uint32_t | num_links
| Number of links to this file's inode (hard links).
uint32_t | num_named_streams
| Number of named data streams this file has.
uint64_t | hard_link_group_id
| A unique identifier for this file's inode.
struct wimlib_timespec | creation_time
| Time this file was created.
struct wimlib_timespec | last_write_time
| Time this file was last written to.
struct wimlib_timespec | last_access_time
| Time this file was last accessed.
uint32_t | unix_uid
| The UNIX user ID of this file.
uint32_t | unix_gid
| The UNIX group ID of this file.
uint32_t | unix_mode
| The UNIX mode of this file.
uint32_t | unix_rdev
| The UNIX device ID (major and minor number) of this file.
struct wimlib_object_id | object_id
int32_t | creation_time_high
| High 32 bits of the seconds portion of the creation timestamp, filled in if `wimlib_timespec.tv_sec` is only 32-bit.
int32_t | last_write_time_high
| High 32 bits of the seconds portion of the last write timestamp, filled in if `wimlib_timespec.tv_sec` is only 32-bit.
int32_t | last_access_time_high
| High 32 bits of the seconds portion of the last access timestamp, filled in if `wimlib_timespec.tv_sec` is only 32-bit.
int32_t | reserved2
uint64_t | reserved [4]
struct wimlib_stream_entry | streams []
| Variable-length array of streams that make up this file.

## Detailed Description

Structure passed to the wimlib_iterate_dir_tree() callback function.

Roughly, the information about a "file" in the WIM image — but really a directory entry ("dentry") because hard links are allowed. The hard_link_group_id field can be used to distinguish actual file inodes.

## Field Documentation

## filename

const wimlib_tchar* wimlib_dir_entry::filename

Name of the file, or NULL if this file is unnamed.

Only the root directory of an image will be unnamed.

## dos_name

const wimlib_tchar* wimlib_dir_entry::dos_name

8.3 name (or "DOS name", or "short name") of this file; or NULL if this file has no such name.

## full_path

const wimlib_tchar* wimlib_dir_entry::full_path

Full path to this file within the image.

Path separators will be WIMLIB_WIM_PATH_SEPARATOR.

## depth

size_t wimlib_dir_entry::depth

Depth of this directory entry, where 0 is the root, 1 is the root's children, ..., etc.

## security_descriptor

const char* wimlib_dir_entry::security_descriptor

Pointer to the security descriptor for this file, in Windows SECURITY_DESCRIPTOR_RELATIVE format, or NULL if this file has no security descriptor.

## security_descriptor_size

size_t wimlib_dir_entry::security_descriptor_size

Size of the above security descriptor, in bytes.

## attributes

uint32_t wimlib_dir_entry::attributes

File attributes, such as whether the file is a directory or not.

These are the "standard" Windows FILE_ATTRIBUTE_* values, although in wimlib.h they are defined as WIMLIB_FILE_ATTRIBUTE_* for convenience on other platforms.

## reparse_tag

uint32_t wimlib_dir_entry::reparse_tag

If the file is a reparse point (FILE_ATTRIBUTE_REPARSE_POINT set in the attributes), this will give the reparse tag.

This tells you whether the reparse point is a symbolic link, junction point, or some other, more unusual kind of reparse point.

## num_links

uint32_t wimlib_dir_entry::num_links

Number of links to this file's inode (hard links).

Currently, this will always be 1 for directories. However, it can be greater than 1 for nondirectory files.

## num_named_streams

uint32_t wimlib_dir_entry::num_named_streams

Number of named data streams this file has.

Normally 0.

## hard_link_group_id

uint64_t wimlib_dir_entry::hard_link_group_id

A unique identifier for this file's inode.

However, as a special case, if the inode only has a single link (`num_links` == 1), this value may be 0.

Note: if a WIM image is captured from a filesystem, this value is not guaranteed to be the same as the original number of the inode on the filesystem.

## creation_time

struct wimlib_timespec wimlib_dir_entry::creation_time

Time this file was created.

## last_write_time

struct wimlib_timespec wimlib_dir_entry::last_write_time

Time this file was last written to.

## last_access_time

struct wimlib_timespec wimlib_dir_entry::last_access_time

Time this file was last accessed.

## unix_uid

uint32_t wimlib_dir_entry::unix_uid

The UNIX user ID of this file.

This is a wimlib extension.

This field is only valid if `unix_mode` != 0.

## unix_gid

uint32_t wimlib_dir_entry::unix_gid

The UNIX group ID of this file.

This is a wimlib extension.

This field is only valid if `unix_mode` != 0.

## unix_mode

uint32_t wimlib_dir_entry::unix_mode

The UNIX mode of this file.

This is a wimlib extension.

If this field is 0, then `unix_uid`, `unix_gid`, `unix_mode`, and `unix_rdev` are all unknown (fields are not present in the WIM image).

## unix_rdev

uint32_t wimlib_dir_entry::unix_rdev

The UNIX device ID (major and minor number) of this file.

This is a wimlib extension.

This field is only valid if `unix_mode` != 0.

## object_id

struct wimlib_object_id wimlib_dir_entry::object_id

## creation_time_high

int32_t wimlib_dir_entry::creation_time_high

High 32 bits of the seconds portion of the creation timestamp, filled in if `wimlib_timespec.tv_sec` is only 32-bit.

## last_write_time_high

int32_t wimlib_dir_entry::last_write_time_high

High 32 bits of the seconds portion of the last write timestamp, filled in if `wimlib_timespec.tv_sec` is only 32-bit.

## last_access_time_high

int32_t wimlib_dir_entry::last_access_time_high

High 32 bits of the seconds portion of the last access timestamp, filled in if `wimlib_timespec.tv_sec` is only 32-bit.

## reserved2

int32_t wimlib_dir_entry::reserved2

## reserved

uint64_t wimlib_dir_entry::reserved[4]

## streams

struct wimlib_stream_entry wimlib_dir_entry::streams[]

Variable-length array of streams that make up this file.

The first entry will always exist and will correspond to the unnamed data stream (default file contents), so it will have `stream_name == NULL`. Alternatively, for reparse point files, the first entry will correspond to the reparse data stream. Alternatively, for encrypted files, the first entry will correspond to the encrypted data.

Then, following the first entry, there be `num_named_streams` additional entries that specify the named data streams, if any, each of which will have `stream_name != NULL`.

The documentation for this struct was generated from the following file:

- wimlib.h