Guest User

Untitled

a guest
May 20th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. static int exist_dir(char *dname)
  2. {
  3. int i;
  4. int num_entries;
  5. cs1550_directory_entry **entries;
  6.  
  7. num_entries = get_dirs(entries);
  8.  
  9. for (i = 0; i< num_entries; i++) {
  10. if (entries[i]->dname == dname) {
  11. free_dirs(entries, num_entries);
  12. return 1;
  13. }
  14. }
  15.  
  16. free_dirs(entries, num_entries);
  17. return 0;
  18. }
Add Comment
Please, Sign In to add comment