Go to the documentation of this file.
48 if (bytes +
sizeof(
Dirent) <= size)
85 const String str(name,
false);
89 if (str.
compareTo(i.current()->name) == 0)
109 const String str(name,
false);
113 if (str.
compareTo(i.current()->name) == 0)
static Size copy(void *dest, const void *src, Size count)
Copy memory from one place to another.
virtual void clear()
Clears the entire List.
char name[DIRENT_LEN]
Name of the file.
virtual File * lookup(const char *name)
Retrieve a File from storage.
FileType
All possible filetypes.
struct Dirent Dirent
Describes an entry inside a Directory.
void insert(FileSystem::FileType type, const char *name)
Insert a new directory entry.
Dirent * get(const char *name)
Retrieve a directory entry by it's name.
virtual int compareTo(const String &str) const
Compares this String to the given String.
virtual ~Directory()
Destructor.
Represents a file present on a FileSystem.
virtual FileSystem::Result read(IOBuffer &buffer, Size &size, const Size offset)
Read directory entries.
FileSystem::FileType type
Type of file.
Size m_size
Size of the file, in bytes.
virtual bool hasCurrent() const
Check if there is a current item on the List.
Directory(const u32 inode)
Constructor.
void append(T t)
Insert an item at the end of the list.
Abstract Input/Output buffer.
List< Dirent * > entries
List of directory entries.
#define NULL
NULL means zero.
unsigned int u32
Unsigned 32-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
void clear()
Clears the internal list of entries.
#define assert(exp)
Insert program diagnostics.
Result
Result code for filesystem Actions.
FileSystem::Result write(const void *buffer, const Size size, const Size offset=ZERO)
Write bytes to the I/O buffer.
#define DIRENT_LEN
Maximum length of a filename.
Describes an entry inside a Directory.
void remove(const char *name)
Remove a directory entry.