 Autodocs Libraries:
dos.library AbortPkt AddBuffers AddDosEntry AddPart AddSegment AllocDosObject AssignAdd AssignLate AssignLock AssignPath AttemptLockDosList ChangeMode CheckSignal Cli CliInitNewcli CliInitRun Close CompareDates CreateDir CreateNewProc CreateProc CurrentDir DateStamp DateToStr Delay DeleteFile DeleteVar DeviceProc DoPkt DupLock DupLockFromFH EndNotify ErrorReport ExAll ExAllEnd ExNext Examine ExamineFH Execute Exit FGetC FGets FPutC FPuts FRead FWrite Fault FilePart FindArg FindCliProc FindDosEntry FindSegment FindVar Flush Format FreeArgs FreeDeviceProc FreeDosEntry FreeDosObject GetArgStr GetConsoleTask GetCurrentDirName GetDeviceProc GetFileSysTask GetProgramDir GetProgramName GetPrompt GetVar Info Inhibit Input InternalLoadSeg InternalUnLoadSeg IoErr IsFileSystem IsInteractive LoadSeg Lock LockDosList LockRecord LockRecords MakeDosEntry MakeLink MatchEnd MatchFirst MatchNext MatchPattern MatchPatternNoCase MaxCli NameFromFH NameFromLock NewLoadSeg NextDosEntry Open OpenFromLock Output ParentDir ParentOfFH ParsePattern ParsePatternNoCase PathPart PrintFault PutStr Read ReadArgs ReadItem ReadLink Relabel RemAssignList RemDosEntry RemSegment Rename ReplyPkt RunCommand SameDevice SameLock Seek SelectInput SelectOutput SendPkt SetArgStr SetComment SetConsoleTask SetCurrentDirName SetFileDate SetFileSize SetFileSysTask SetIoErr SetMode SetOwner SetProgramDir SetProgramName SetPrompt SetProtection SetVBuf SetVar SplitName StartNotify StrToDate StrToLong SystemTagList UnGetC UnLoadSeg UnLock UnLockDosList UnLockRecord UnLockRecords VFPrintf VFWritef VPrintf WaitForChar WaitPkt Write WriteChars Include GuruMeditation
|
Docs » Autodocs » dos.library » Write
Write -- Write bytes of data to a file
returnedLength = Write( file, buffer, length ) D0 D1 D2 D3 LONG Write (BPTR, void *, LONG)
Write() writes bytes of data to the opened file 'file'. 'length' indicates the length of data to be transferred; 'buffer' is a pointer to the buffer. The value returned is the length of information actually written. So, when 'length' is greater than zero, the value of 'length' is the number of characters written. Errors are indicated by a value of -1. Note: this is an unbuffered routine (the request is passed directly to the filesystem.) Buffered I/O is more efficient for small reads and writes; see FPutC().
file - BCPL pointer to a file handle buffer - pointer to the buffer length - integer
returnedLength - integer
Read(), Seek(), Open(), Close(), FPutC()
|