Skip to content

toPosixBuffer

Converts a buffer containing a path to a POSIX-style buffer by replacing backslashes with forward slashes.

Import:

import { toPosixBuffer } from '@mnaoumov/typescript-lib/path';

Signature:

function toPosixBuffer(buffer: Buffer<ArrayBufferLike>): Buffer<ArrayBufferLike>

Parameters:

Parameter Type Description
buffer Buffer<ArrayBufferLike> The buffer to convert.

Returns: Buffer<ArrayBufferLike> — A new buffer containing the POSIX-style path.