Function truncateSync

  • Truncates the file. Returns undefined. A file descriptor can also be passed as the first argument. In this case, fs.ftruncateSync() is called.

    Passing a file descriptor is deprecated and may result in an error being thrown in the future.

    Since

    v0.0.67

    Parameters

    • path: PathLike
    • Optional len: number

    Returns void

  • Truncates the file. Returns undefined. A file descriptor can also be passed as the first argument. In this case, fs.ftruncateSync() is called.

    Passing a file descriptor is deprecated and may result in an error being thrown in the future.

    Since

    v0.0.67

    Parameters

    • path: PathLike
    • Optional len: number

    Returns void

Generated using TypeDoc