From c731d625fe5f7626b41c7241893350b8b27b1dbe Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 10 Mar 2011 15:56:51 +0100 Subject: Add basic file-system functionality std.fs.list_dir will list the files in a directory, std.fs.file_is_dir will, given a pathname, determine whether it is a directory or not. --- src/rt/util/array_list.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/rt/util/array_list.h') diff --git a/src/rt/util/array_list.h b/src/rt/util/array_list.h index d44111e8..9ad4b208 100644 --- a/src/rt/util/array_list.h +++ b/src/rt/util/array_list.h @@ -19,6 +19,7 @@ public: bool replace(T old_value, T new_value); int32_t index_of(T value); bool is_empty(); + T* data(); T & operator[](size_t index); }; @@ -101,4 +102,9 @@ array_list::is_empty() { return _size == 0; } +template T* +array_list::data() { + return _data; +} + #endif /* ARRAY_LIST_H */ -- cgit v1.2.3