藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年6月6日 10:18


刪除文件

使用c語言怎樣刪除一個文件,已經知道文件的名稱。請大蝦幫幫忙

刪除文件

unlink

刪除文件

結果和在操作系統裡使用rm 一樣嗎

刪除文件

你不放心乾脆
system(rm)
算了

刪除文件

-->  
你倒乾脆,呵呵!

刪除文件

ok

刪除文件

man unlink

刪除文件

man unlink
[code]Fortran Library Routines                               UNLINK(3F)



NAME
     unlink - remove a file

SYNOPSIS
     integer function unlink ( name )
     character *(*) name

DESCRIPTION
     The function unlink removes the file specified by  the  path
     name  name.   If this is the last link to the file, the con-
     tents of the file are lost.  The returned value is  zero  if
     successful, a system error code otherwise.

EXAMPLE
     The following program removes the file stuff:

     demo% ls
     a.f     other   stuff
     demo% cat a.f
             external unlink
             call unlink( 'stuff' )
             stop
             end
     demo% f77 a.f
     a.f:
      MAIN:
     demo% ls
     a.f     a.out*  other   stuff
     demo% a.out
     demo% ls
     a.f     a.out*  other
     demo%

FILES
     libF77.a

SEE ALSO
     unlink(2), link(3F), perror(3F)

BUGS
     Path names cannot be longer than MAXPATHLEN  as  defined  in
     <sys/param.h>;.


SunOS 5.8           Last change: 07 July 1995                   1[/code]

咦,怎麼是Fortran77?

刪除文件

remove呢?

刪除文件

SEE ALSO
     unlink(2), link(3F), perror(3F)

man 2 unlink看

remove不是所有的系統都提供吧
如果你的系統上有那麼就看看它幫助



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com