diff options
author | Steve Block <steveblock@google.com> | 2010-04-27 16:23:55 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-04-27 17:07:03 +0100 |
commit | 692e5dbf12901edacf14812a6fae25462920af42 (patch) | |
tree | d62802373a429e0a9dc093b6046c166b2c514285 /WebCore/platform/haiku | |
parent | e24bea4efef1c414137d36a9778aa4e142e10c7d (diff) | |
download | external_webkit-692e5dbf12901edacf14812a6fae25462920af42.zip external_webkit-692e5dbf12901edacf14812a6fae25462920af42.tar.gz external_webkit-692e5dbf12901edacf14812a6fae25462920af42.tar.bz2 |
Merge webkit.org at r55033 : Initial merge by git
Change-Id: I98a4af828067cc243ec3dc5e5826154dd88074b5
Diffstat (limited to 'WebCore/platform/haiku')
-rw-r--r-- | WebCore/platform/haiku/FileSystemHaiku.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/WebCore/platform/haiku/FileSystemHaiku.cpp b/WebCore/platform/haiku/FileSystemHaiku.cpp index 7400cd1..3d9161a 100644 --- a/WebCore/platform/haiku/FileSystemHaiku.cpp +++ b/WebCore/platform/haiku/FileSystemHaiku.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> + * Copyright (C) 2010 Stephan Aßmus <superstippi@gmx.de> * * All rights reserved. * @@ -29,9 +30,14 @@ #include "FileSystem.h" #include "CString.h" +#include "NotImplemented.h" #include "PlatformString.h" -#include "NotImplemented.h" +#include <Directory.h> +#include <Entry.h> +#include <File.h> +#include <FindDirectory.h> +#include <Path.h> namespace WebCore { @@ -43,8 +49,11 @@ CString fileSystemRepresentation(const String& string) String homeDirectoryPath() { - notImplemented(); - return String(); + BPath path; + if (find_directory(B_USER_DIRECTORY, &path) != B_OK) + return String(); + + return String(path.Path()); } CString openTemporaryFile(const char* prefix, PlatformFileHandle& handle) @@ -74,7 +83,10 @@ bool unloadModule(PlatformModule) Vector<String> listDirectory(const String& path, const String& filter) { Vector<String> entries; - notImplemented(); + BDirectory directory(path.utf8().data()); + entry_ref ref; + while (directory.GetNextRef(&ref) == B_OK) + entries.append(ref.name); return entries; } |