如何在c/C++中以编程方式创建软链接? freebsd中的link()系统调用将创建一个硬链接。如何在c/C++中以编程方式创建软链接?
7
A
回答
9
系统调用你想要的是symlink(2)。
#include <unistd.h>
int symlink(const char *name1, const char *name2);
符号链接
name2
创建于name1
+0
谢谢,这有助于:) – 2014-09-30 10:11:40
4
您可以拨打symlink()
int symlink(const char *name1, const char *name2);
A symbolic link name2 is created to name1 (name2 is the name of the file
created, name1 is the string used in creating the symbolic link). Either
name may be an arbitrary path name; the files need not be on the same
file system.
+0
谢谢,这有助于。系统编程新手。 – 2014-09-30 10:13:17
相关问题
- 1. 如何以编程方式创建命令链接
- 2. 以编程方式在EmberJS视图中创建链接
- 3. 以编程方式在PDF文件中创建链接
- 4. 以编程方式在Silverlight DataGrid中创建超链接列
- 5. 如何以编程方式在Drupal 7中创建多语言菜单链接
- 6. 如何以编程方式创建UIButton
- 7. 如何以编程方式创建GPO?
- 8. 如何以编程方式创建JPEG
- 9. 如何以编程方式创建DrawerLayout
- 10. 如何以编程方式创建NSPopover
- 11. 如何以编程方式创建SplitView?
- 12. 如何以编程方式创建Tabbar
- 13. 如何以编程方式创建UIViewController?
- 14. 如何以编程方式创建UISplitViewController?
- 15. 如何以编程方式创建CustomCell?
- 16. 如何以编程方式创建UIScrollView?
- 17. 如何以编程方式创建dojox.mobile.TabBar?
- 18. 如何以编程方式创建ProgressBar?
- 19. 如何以编程方式创建UIScrollview
- 20. 如何以编程方式创建UICollectionViewCell
- 21. 如何以编程方式创建NSFetchedPropertyDescription?
- 22. 如何以编程方式创建DSN?
- 23. 如何以编程方式创建BasicHttpBinding?
- 24. 如何以编程方式创建NSTextField?
- 25. 如何以编程方式创建dojo.mobile.view?
- 26. 如何以编程方式创建NSSearchField?
- 27. 如何以编程方式创建TextView?
- 28. 以编程方式在MS Access中创建ODBC连接和链接表
- 29. 如何以有效的方式在jQuery中创建链接?
- 30. 创建软链接
''中定义unistd.h'功能symlink'。 – isedev 2014-09-30 09:59:29