remove project dir

svn path=/trunk/boinc/; revision=676
This commit is contained in:
Eric Heien 2002-12-02 20:52:22 +00:00
parent c022311f51
commit 18fa10f597
2 changed files with 21 additions and 0 deletions

View File

@ -145,6 +145,16 @@ int make_project_dir(PROJECT& p) {
return 0; return 0;
} }
int remove_project_dir(PROJECT& p) {
char buf[256],buf2[256];
escape_project_url(p.master_url, buf);
sprintf(buf2, "%s%s%s", PROJECTS_DIR, PATH_SEPARATOR, buf);
clean_out_dir(buf2);
RemoveDirectory(buf2);
return 0;
}
// Returns the location of a numbered slot directory // Returns the location of a numbered slot directory
// //
int make_slot_dir(int slot) { int make_slot_dir(int slot) {
@ -173,6 +183,16 @@ int make_project_dir(PROJECT& p) {
return 0; return 0;
} }
int remove_project_dir(PROJECT& p) {
char buf[256],buf2[256];
escape_project_url(p.master_url, buf);
sprintf(buf2, "%s%s%s", PROJECTS_DIR, PATH_SEPARATOR, buf);
clean_out_dir(buf2);
rmdir(buf2);
return 0;
}
// Create the slot directory for the specified slot # // Create the slot directory for the specified slot #
// //
int make_slot_dir(int slot) { int make_slot_dir(int slot) {

View File

@ -30,6 +30,7 @@ extern void get_pathname(FILE_INFO* fip, char* path);
extern void get_slot_dir(int slot, char* path); extern void get_slot_dir(int slot, char* path);
extern int make_project_dir(PROJECT&); extern int make_project_dir(PROJECT&);
extern int remove_project_dir(PROJECT&);
extern int make_slot_dir(int); extern int make_slot_dir(int);
extern void get_account_filename(char* master_url, char* path); extern void get_account_filename(char* master_url, char* path);
extern bool is_account_file(char*); extern bool is_account_file(char*);