FOSSology  4.4.0
Open Source License Compliance by Open Source Software
utility.c File Reference

Judge if the file or directory is existed not. More...

#include <stdio.h>
#include <sys/stat.h>
#include "utility.h"
Include dependency graph for utility.c:

Go to the source code of this file.

Functions

int file_dir_existed (char *path_name)
 
int RemoveDir (char *dirpath)
 Remove all files under dirpath. More...
 

Detailed Description

Judge if the file or directory is existed not.

Parameters
path_nameThe file or directory name including path
Returns
existed or not, 0: not existed, 1: existed

Definition in file utility.c.

Function Documentation

◆ RemoveDir()

int RemoveDir ( char *  dirpath)

Remove all files under dirpath.

Remove all files under dirpath (rm -rf)

Parameters
path_nameThe file or directory name including path
Returns
existed or not, 0: not existed, 1: existed

Definition at line 34 of file utility.c.