changeFileSize(fileHandle:size:eventLoop:)

    Changes the file size of fileHandle to size.

    NonBlockingFileIO.swift:423
    func changeFileSize(fileHandle: NIOFileHandle, size: Int64, eventLoop: EventLoop) -> EventLoopFuture<()>

    Parameters

    fileHandle

    The NIOFileHandle to write to.

    size

    The new file size in bytes to write.

    eventLoop

    The EventLoop to create the returned EventLoopFuture from.

    Returns

    An EventLoopFuture which is fulfilled if the write was successful or fails on error.

    If size is smaller than the current file size, the remaining bytes will be truncated and are lost. If size is larger than the current file size, the gap will be filled with zero bytes.

    Other members in extension

    Types

    Type members

    Instance members