[#BloombergLP-bdls-FilesystemUtil-rollFileChain]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::rollFileChain
:relfileprefix: ../../../
:mrdocs:

Remove the file at the specified `path` appended with the specified `maxSuffix` using a `&period;` as a separator&period; Then move the files with the suffixes `&period;1` to `&period;maxSuffix&hyphen;1` so they have new suffixes from `&period;2` to `&period;maxSuffix`&period; Finally, move `path` to `path` with a `&period;1` suffix&period; Return 0 on success, and non&hyphen;zero otherwise&period;

== Synopsis

Declared in `&lt;bdls&lowbar;filesystemutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
rollFileChain(
    std::string&lowbar;view const& path,
    int maxSuffix);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
