VxWorks上覆制文件的簡單API(看起來像Windows API上的CopyFile())是什麼?VxWorks上的CopyFile()
回答
我假設你正在談論在命令shell工作,所以這些命令可能看起來像:
-> ls // lists the current directory contents
Myfile1
Myfile2
YourFile2.txt
value = 0 = 0x0 //return status of the ls command - executed w/o errors*
-> copy "Myfile1","/YourDirectory/Myfile1" // FORMAT: copy "src" , "dest"*
// NB: src & dest argument must be strings*
value = 0 = 0x0 // return status of copy command.
-> cd "/YourDirectory/" // change default directory - notice the trailing slash (/)
value = 0 = 0x0 // return status of cd command
-> ls
xyzfile
Myfile1
value = 0 = 0x0
我希望這有助於 HadziJo
感謝拷貝文件,我需要在運行時 – 2011-03-30 16:39:30
一般而言,可以在執行什麼可以從shell以外的程序調用該shell。
status = copy("Myfile1", "/YourDirectory/Myfile1");
if (status == OK) .....
你可能看手冊頁爲xcopy
以及取決於你所需要的功能。
應用解決方案沒有CP()例程,複製文件。有關文件操作例程的更多信息,請參見VxWorks內核API參考庫usrFsLib – 2011-04-04 15:15:37
您也可以在cmd shell(vxWorks 6.x)上使用「cp」命令,但這不是API,因此可能不會完全回答您的問題。
我發現的最好的方法是xcopy("fromPath", "toPath")
。它將遞歸地(包括文件夾和子文件夾)複製(複製)從路徑到路徑的所有內容。
退房的VXWORK手冊:http://www.vxdev.com/docs/vx55man/vxworks/ref/usrFsLib.html#xcopy
- 1. CopyFile Vbscript
- 2. CopyFile上的VBScript權限被拒絕
- 3. 僅在目標機器上的Wix CopyFile
- 4. CopyFile發生錯誤
- 5. 在VxWorks的
- 6. VBScript的CopyFile不起作用
- 7. INSTALLSCRIPT的CopyFile功能錯誤
- 8. VxWorks上strerror_r的最大消息大小
- 9. vxworks中的任務
- 10. vxworks中的C++ 11
- 11. C++ CopyFile函數問題
- 12. CopyFile不能正常工作
- 13. Linux/vxworks信號
- 14. 函數在VxWorks上運行混淆
- 15. Ubuntu上Xenomai:禁用vxworks皮膚?
- 16. 使用copyFile在IIS上的ASP經典權限錯誤
- 17. 的CopyFile Excel VBA中的路徑錯誤
- 18. 的VxWorks 6.6的性能
- 19. Vxworks的殼的grep功能
- 20. VBS中CopyFile的權限被拒絕
- 21. C++中當前目錄的CopyFile(windows API)
- 22. VxWorks編譯錯誤
- 23. 分析VxWorks系統
- 24. VxWorks用戶腳本
- 25. 用於Vxworks的RTP項目
- 26. 設置在VxWorks的RTP
- 27. CopyFile是否在源文件上放置任何鎖定?
- 28. 爲什麼CopyFile2替換CopyFile和CopyFileEx?
- 29. CopyFile docx隱藏轉換爲文檔
- 30. 中斷處理程序在VxWorks(PowerPC)上使用的堆棧
需要從運行VxWorks的應用... – 2011-03-30 16:42:09