MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / Allocate

Method Allocate

deps/FtpClient/FTPClient.cpp:1742–1755  ·  view source on GitHub ↗

Executes the FTP command ALLO (ALLOCATE) This command may be required by some servers to reserve sufficient storage to accommodate the new file to be transferred. @param[in] iReserveBytes The argument shall be a decimal integer representing the number of bytes (using the logical byte size) of storage to be reserved for the file. For files sent with record or page structure a maximum record or page

Source from the content-addressed store, hash-verified

1740/// accept a dummy value in the first argument and ignore it.
1741/// @return see return values of CFTPClient::SimpleErrorCheck
1742int CFTPClient::Allocate(int iReserveBytes, const int* piMaxPageOrRecordSize/*=NULL*/) const
1743{
1744 CArg Arguments(CMakeString() << iReserveBytes);
1745 if( piMaxPageOrRecordSize!=NULL )
1746 {
1747 Arguments.push_back(_T("R"));
1748 Arguments.push_back(CMakeString() << *piMaxPageOrRecordSize);
1749 }
1750
1751 CReply Reply;
1752 if( !SendCommand(CCommand::ALLO(), Arguments, Reply) )
1753 return FTP_ERROR;
1754 return SimpleErrorCheck(Reply);
1755}
1756
1757/// Executes the FTP command SMNT ()
1758/// @return see return values of CFTPClient::SimpleErrorCheck

Callers

nothing calls this directly

Calls 1

CMakeStringClass · 0.85

Tested by

no test coverage detected