CimFS

A CIM is a file-backed image format similar in concept to a WIM.

The CIM format consists of a small collection of flat files that include one or more data and metadata region files, one or more object ID files and one or more filesystem description files. As a result of their "flatness" CIMs are faster to construct, extract and delete than the equivalent raw directories they contain.

CIMs are composite in that a given image can contain multiple file system volumes which can be mounted individually while sharing the same data region backing files.

Once constructed, a CIM can be mounted with the support of the CimFS driver. The mount constructs a read-only disk and file system volume device for the image. The contents of a mounted CIM can be accessed read-only using the standard Win32 or NT API file system interface. The CimFS file system supports many of the constructs of NTFS such as security descriptors, alternate data streams, hard links, and re-parse points.

CIMs support de-duplication at the file level. If multiple copies of the same file are added to a CIM using different paths, there will only be a single copy of the file data stored in the CIM.

CIMs were originally designed and optimized to be used as a Windows Container image layout.

To develop with CimFS, you need this header:

And you will need to link with this library:

  • cimfs.lib

This sample demonstrates how to use the Composite Image File System (CimFS) APIs to create, configure, and manipulate CimFS Images.

Enumerations

 
CIM_MOUNT_IMAGE_FLAGS

The CIM_MOUNT_IMAGE_FLAGS enumeration contains flags that can be used to modify the behavior of CimMountImage.

Functions

 
CimCloseImage

The CimCloseImage function frees resources associated with the image handle.
CimCloseStream

The CimCloseStream function frees resources associated with the stream handle.
CimCommitImage

The CimCommitImage function commits the image represented by the image handle.
CimCreateAlternateStream

The CimCreateAlternateStream function adds an alternate stream with the specified size at a path relative to the image represented by the image handle.
CimCreateFile

The CimCreateFile function adds a new file or directory with the specified metadata at a path relative to the image represented by the image handle.
CimCreateHardLink

The CimCreateHardLink function adds a hard link to an existing path relative to the image represented by the image handle.
CimCreateImage

The CimCreateImage function creates a handle representing a new image at the location specified, optionally based on an existing image at that location.
CimDeletePath

The CimDeletePath function removes the file, stream, directory or hardlink at a path relative to the image represented by the image handle.
CimDismountImage

The CimDismountImage function dismounts an image mounted with volumeId as the volume GUID.
CimMountImage

The CimMountImage function mounts the named image from the location specified by cimPath as a volume with the volume GUID specified by volumeId.
CimWriteStream

The CimWriteStream function writes data from the specified buffer to the stream represented by the stream handle.

Structures

 
CIMFS_FILE_METADATA

The CIMFS_FILE_METADATA structure specifies file metadata for the file to be added by CimCreateFile.