[#BloombergLP-bdls-FilesystemUtil-rollFileChain] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::rollFileChain :relfileprefix: ../../../ :mrdocs: Roll the file chain at `path` so that `path` becomes `path.1`. == Synopsis Declared in `<bdls_filesystemutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int rollFileChain( std::string_view const& path, int maxSuffix); ---- == Description Remove the file at the specified `path` appended with the specified `maxSuffix` using a `.` as a separator. Then move the files with the suffixes `.1` to `.maxSuffix‐1` so they have new suffixes from `.2` to `.maxSuffix`. Finally, move `path` to `path` with a `.1` suffix. Return 0 on success, and non‐zero otherwise. == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *path* | filesystem path of the file to roll | *maxSuffix* | highest numeric suffix in the file chain |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#