- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hello!
I'm using the intel fortran compiler. I realize that the subroutine 'PXFMKDIR' can create a directory. Could anyone tell me which subroutine (or function) can delete a directory containing some files?
I just want something different from the 'SYSTEM'-like functions.
Thank you in advance!
링크가 복사됨
2 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
It looks like you have the choice between deleting the files first, then deleting the directory by Posix or legacy QQ function calls, or shell commands like SYSTEM("rm -r ....") (soon to be replaced by execute_command_line)
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
To add to TimP's comment regarding SYSTEM, or soon to be replaced by execute_command_line, I suggest that the text that you use to provide the command comes from a resource file or "config" file as opposed to being hard coded into the application. The directory delete command name may depend upon the users shell choice (isdirectory delete aDEL, RMDIR, UNLINK, ...?). And as Tim eludes, the directory removal may or may not require pre-deletion of files (assuming none are open) and/or removal from focus by other processes (no other process having current directory as that which you wish to delete). If you want to bullet-proof and future-proof the directory delete operation, these issues, and maybe more, should be addressed.
Jim Dempsey
Jim Dempsey