MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / WriteLine

Method WriteLine

UTCP/src/UTDataSource.cpp:318–333  ·  view source on GitHub ↗

WriteLine Writes line to the message file PARAM: buffer - line to write RETURN: -1 if error ************************************************/

Source from the content-addressed store, hash-verified

316 -1 if error
317************************************************/
318int CUT_FileDataSource::WriteLine(LPCSTR buffer) {
319
320 // Wrong parameter
321 if(buffer == NULL) return -1;
322
323 // Write line to the file
324 int rt = UTE_SUCCESS, len = (int)strlen(buffer);
325 if(len > 0)
326 rt = m_file.Write(buffer, len);
327
328 // Write CRLF if the buffer doesn't have one
329 if(!CUT_StrMethods::IsWithCRLF(buffer))
330 m_file.Write("\r\n", 2);
331
332 return rt;
333}
334
335/***********************************************
336Read

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected