40 if (filepath[0] !=
'/')
42 snprintf(buf,
sizeof(buf),
"%s/%s", cwd, filepath);
48 if ((*i.current())[0] !=
'.')
53 else if ((*i.current())[1] ==
'.' && last.
length() > 0)
59 memset(buf, 0,
sizeof(buf));
70 path = (
char *) filepath;
80 if (
stat(path, &st) != 0)
FileSystemClient provides a simple interface to a FileSystemServer.
void setCurrentDirectory(const String &directory)
Set new current directory.
Simple filesystem path parser.
const List< String > & split() const
Returns a List of separate path elements.
virtual bool hasCurrent() const
Check if there is a current item on the List.
Simple linked list template class.
void append(T t)
Insert an item at the end of the list.
virtual int remove(T t)
Remove all items which are equal to the given item.
Size length() const
Same as count().
C int errno
The lvalue errno is used by many functions to return error values.
C void * memset(void *dest, int ch, size_t count)
Fill memory with a constant byte.
#define S_ISDIR(m)
Test for a directory.
C char * strcat(char *dest, const char *src)
Concatenate two strings.
#define ENOTDIR
Not a directory.
C int strcpy(char *dest, const char *src)
Copy a string.
int chdir(const char *filepath)
Change working directory.
C char * getcwd(char *buf, size_t size)
Get the pathname of the current working directory.
C int snprintf(char *buffer, unsigned int size, const char *fmt,...)
Write a formatted string into a buffer.
#define PATH_MAX
Maximum file path length.
The <sys/stat.h> header shall define the stat structure.
mode_t st_mode
Mode of file.