forked from KolibriOS/kolibrios
- Added 4 functions to libck: getcwd, setcwd, mkdir, rmdir.
- Fixed Makefile for building "libck" under tcc. - Added example to new functions git-svn-id: svn://kolibrios.org@8280 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
20
programs/develop/ktcc/trunk/libc/include/dir.h
Normal file
20
programs/develop/ktcc/trunk/libc/include/dir.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef _DIR_H
|
||||
#define _DIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define PATH_MAX 4096
|
||||
|
||||
// Get the path to the working directory(if buf is NULL, then memory will be allocated automatically)
|
||||
char *getcwd(char *buf, unsigned size);
|
||||
|
||||
// Set path to working directory
|
||||
void setcwd(const char* cwd);
|
||||
|
||||
// Remove directory (returns "true" if successful)
|
||||
bool rmdir(const char* dir);
|
||||
|
||||
// Create directory (returns "true" if successful)
|
||||
bool mkdir(const char* dir);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user