Go to the documentation of this file.
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)
#define S_ISDIR(m)
Test for a directory.
The <sys/stat.h> header shall define the stat structure.
Simple filesystem path parser.
C int errno
The lvalue errno is used by many functions to return error values.
Size length() const
Same as count().
char * getcwd(char *buf, size_t size)
Get the pathname of the current working directory.
FileSystemClient provides a simple interface to a FileSystemServer.
#define PATH_MAX
Maximum file path length.
int strcpy(char *dest, const char *src)
Copy a string.
virtual int remove(T t)
Remove all items which are equal to the given item.
virtual bool hasCurrent() const
Check if there is a current item on the List.
void setCurrentDirectory(const String &directory)
Set new current directory.
const List< String > & split() const
Returns a List of separate path elements.
void append(T t)
Insert an item at the end of the list.
char * strcat(char *dest, const char *src)
Concatenate two strings.
mode_t st_mode
Mode of file.
int stat(const char *path, struct stat *buf)
Get file status.
int chdir(const char *filepath)
Change working directory.
void * memset(void *dest, int ch, size_t count)
Fill memory with a constant byte.
#define ENOTDIR
Not a directory.
int snprintf(char *buffer, unsigned int size, const char *fmt,...)
Write a formatted string into a buffer.