File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -554,6 +554,17 @@ FileOutputStream::~FileOutputStream() {
554554 DCHECK (impl_->Close ().ok ());
555555}
556556
557+ Status FileOutputStream::Open (const std::string& path,
558+ std::shared_ptr<OutputStream>* file) {
559+ return Open (path, false , file);
560+ }
561+
562+ Status FileOutputStream::Open (const std::string& path, bool append,
563+ std::shared_ptr<OutputStream>* out) {
564+ *out = std::shared_ptr<FileOutputStream>(new FileOutputStream ());
565+ return std::static_pointer_cast<FileOutputStream>(*out)->impl_ ->Open (path, append);
566+ }
567+
557568Status FileOutputStream::Open (const std::string& path,
558569 std::shared_ptr<FileOutputStream>* file) {
559570 return Open (path, false , file);
Original file line number Diff line number Diff line change @@ -39,6 +39,21 @@ class ARROW_EXPORT FileOutputStream : public OutputStream {
3939 public:
4040 ~FileOutputStream () override ;
4141
42+ // / \brief Open a local file for writing, truncating any existing file
43+ // / \param[in] path with UTF8 encoding
44+ // / \param[out] out a base interface OutputStream instance
45+ // /
46+ // / When opening a new file, any existing file with the indicated path is
47+ // / truncated to 0 bytes, deleting any existing memory
48+ static Status Open (const std::string& path, std::shared_ptr<OutputStream>* out);
49+
50+ // / \brief Open a local file for writing
51+ // / \param[in] path with UTF8 encoding
52+ // / \param[in] append append to existing file, otherwise truncate to 0 bytes
53+ // / \param[out] out a base interface OutputStream instance
54+ static Status Open (const std::string& path, bool append,
55+ std::shared_ptr<OutputStream>* out);
56+
4257 // / \brief Open a local file for writing, truncating any existing file
4358 // / \param[in] path with UTF8 encoding
4459 // / \param[out] file a FileOutputStream instance
You can’t perform that action at this time.
0 commit comments