diff options
| author | Marijn Haverbeke <[email protected]> | 2011-03-10 15:56:51 +0100 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-14 14:57:13 -0700 |
| commit | c731d625fe5f7626b41c7241893350b8b27b1dbe (patch) | |
| tree | 9b5c8f5071d44d601914fa9ea1e44e07fe6f23db /src/rt/util/array_list.h | |
| parent | Split trans' collection in two passes. This allows us to handle tags (diff) | |
| download | rust-c731d625fe5f7626b41c7241893350b8b27b1dbe.tar.xz rust-c731d625fe5f7626b41c7241893350b8b27b1dbe.zip | |
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.
Diffstat (limited to 'src/rt/util/array_list.h')
| -rw-r--r-- | src/rt/util/array_list.h | 6 |
1 files changed, 6 insertions, 0 deletions
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<T>::is_empty() { return _size == 0; } +template<typename T> T* +array_list<T>::data() { + return _data; +} + #endif /* ARRAY_LIST_H */ |