add: }
context: open_dir(const char *path){	// open the dir	DIR *dir = opendir(path);	if (!dir)		return errno;	// stat the entry	struct stat st;	if (lstat(path, &st) < 0)		return errno;	if (!S_ISDIR(st.st_mode))		return B_NOT_A_DIRECTORY;	// cache dir path	NodeRef ref(st);	add_dir_path(path, ref);	// create descriptor		DirectoryDescriptor *descriptor = new DirectoryDescriptor(dir, ref);	return add_descriptor(descriptor);}