This program demonstrates how to create a directory using the mkdir() and file stat() functions in C. The directory will be created if it presently doesn't exist.
The full source code for example_mkdir.c is available at http://www.cs.sjsu.edu/~bruce/programs/spring_2017_cs_160_section_2/example_mkdir/example_mkdir.c (right mouse click then select "Save link as" to download).
A makefile to compile example_mkdir.c is available at http://www.cs.sjsu.edu/~bruce/programs/spring_2017_cs_160_section_2/example_mkdir/Makefile (right mouse click then select "Save link as" to download).
To compile example_mkdir.c, type make within a shell command prompt in the same directory containining example_mkdir.c and your Makefile.
Spring 2017, CS-160-02:
Lectures:
Assignments:
Handouts:
Programs: