// универсальность добавления / :void copyf(dword from1, in1) { dword error; BDVK CopyFile_atr1; if (!from1) || (!in1) { notify("Error: too less copyf params!"); notify(from1); notify(in1); return; } error = GetFileInfo(from1, #CopyFile_atr1); if (error) debug("Error: copyf->GetFileInfo"); else if (isdir(from1)) CopyFolder(from1, in1); else CopyFile(from1, in1); } :int CopyFile(dword copy_from3, copy_in3) { BDVK CopyFile_atr; dword error, cbuf; debug(copy_from3); error = GetFileInfo(copy_from3, #CopyFile_atr); if (error) {debug("Error: CopyFile->GetFileInfo"); debug(copy_from3);} else { cbuf = malloc(CopyFile_atr.sizelo); error = ReadFile(0, CopyFile_atr.sizelo, cbuf, copy_from3); if (error) debug("Error: CopyFile->ReadFile"); else { error = WriteFile(CopyFile_atr.sizelo, cbuf, copy_in3); if (error) debug("Error: CopyFile->WriteFile"); } } free(cbuf); if (error) debug(copy_from3); return error; } :void CopyFolder(dword from2, in2) { dword dirbuf, fcount, filename; int i, error, isdir; char copy_from2[4096], copy_in2[4096]; error = GetDir(#dirbuf, #fcount, from2); if (error) { debug("Error: CopyFolder->GetDir"); debug_error(from2, error); debug_error(in2, error); free(dirbuf); return; } if ((strcmp(in2, "/sys")!=0) && (strcmp(in2, "/tmp9/1")!=0)) { error = CreateDir(in2); if (error) debug_error(in2, error); } chrcat(in2, '/'); chrcat(from2, '/'); for (i=0; i