How to create a folder in C (need to run on both Linux and Windows)

后端 未结 3 1544
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-03 02:52

I don\'t have much experience and I\'m on a C project where I need to create & delete folders and the program must run on both Linux and Windows.

I saw few solut

3条回答
  •  梦毁少年i
    2021-01-03 03:22

    As I know, you can use the cd (change directory) command to create folder. You can use the rmdir command to delete empty directories. If you want to delete the directory with its contents, use rm -rf name-of-the-directory. The -rf specifies to force the deletion and to do it recursively.

    You can use these using the command line, but if you want to do this programmatically, I'd say that PHP is suitable to do such.

提交回复
热议问题