Skip to content

[CPP].Does the CPP version support append writing? #252

Open
@t59688

Description

@t59688

Does the C++ version support appending to files? I haven't found any examples of appending in the test and sample code; it seems like the file is deleted and recreated each time, whereas the Java version does support appending。

C++

int TsFileWriter::open(const std::string &file_path, int flags, mode_t mode) {
    if (check_file_exist(file_path)) {
        return E_ALREADY_EXIST;
    }

java

    try (ForceAppendTsFileWriter fwriter = new ForceAppendTsFileWriter(f)) {
      fwriter.doTruncate();
      write(fwriter);
    } catch (Exception e) {
      LOGGER.error("ForceAppendTsFileWriter truncate or write error ", e);
    }
  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions