library/src/filesystem/BP-Filesystem.cc
// duplicates an element, no pointers are set
duplicates an element, no pointers are set
duplicates an element no pointers are set
P_BP_FILE_LIST BP_FileListDupElement(P_BP_FILE_LIST inList)
{
	P_BP_FILE_LIST outList;
	if(inList == NULL)
		return NULL;
	outList = (P_BP_FILE_LIST) bpmalloc(sizeof(BP_FILE_LIST));
	outList->pathToFile = (char *) bpmalloc(bpstrlen(inList->pathToFile)+1);
		strcpy(outList->pathToFile, inList->pathToFile);
	outList->type = inList->type;
		memcpy(&outList->attrs, &inList->attrs, sizeof(struct stat));
	outList->read = inList->read;
	outList->write = inList->write;
	outList->execute = inList->execute;
	outList->first = NULL;
	outList->prev  = NULL;
	outList->next  = NULL;
	return outList;
}
P_BP_FILE_LIST BP_FileListDupElement ( P_BP_FILE_LIST inList ) { P_BP_FILE_LIST outList ; if ( inList == NULL ) return NULL ; outList = ( P_BP_FILE_LIST ) bpmalloc ( sizeof ( BP_FILE_LIST ) ) ; outList -> pathToFile = ( char * ) bpmalloc ( bpstrlen ( inList -> pathToFile ) + 1 ) ; strcpy ( outList -> pathToFile , inList -> pathToFile ) ; outList -> type = inList -> type ; memcpy ( & outList -> attrs , & inList -> attrs , sizeof ( struct stat ) ) ; outList -> read = inList -> read ; outList -> write = inList -> write ; outList -> execute = inList -> execute ; outList -> first = NULL ; outList -> prev = NULL ; outList -> next = NULL ; return outList ; }
duplicates an element, no pointers are set
duplicates an element no pointers are set
// set type // set rwx // nullify pointers