Have getFileMetadata() return a std::optional<FileMetadata>
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Sep 2017 22:03:33 +0000 (22:03 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Sep 2017 22:03:33 +0000 (22:03 +0000)
commitf1b3a6cf7868704df06b2dc615956c2bfe6de032
tree02b9df4b8f67a8cae55b998fa3a9c588c6613f7b
parent2df17ec52b552cc3e3c24b58a57a0a937acaffea
Have getFileMetadata() return a std::optional<FileMetadata>
https://bugs.webkit.org/show_bug.cgi?id=176293

Reviewed by Darin Adler.

Source/WebCore:

Have getFileMetadata() return a std::optional<FileMetadata> instead of
using an out parameter for the metadata.

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::listDirectoryWithMetadata):
(WebCore::validatePathIsExpectedType):
(WebCore::DOMFileSystem::getEntry):
* html/FileListCreator.cpp:
(WebCore::appendDirectoryFiles):
* platform/FileSystem.cpp:
(WebCore::fileIsDirectory):
* platform/FileSystem.h:
* platform/glib/FileSystemGlib.cpp:
(WebCore::getFileMetadata):
* platform/network/BlobDataFileReference.cpp:
(WebCore::BlobDataFileReference::startTrackingModifications):
* platform/network/mac/BlobDataFileReferenceMac.mm:
(WebCore::BlobDataFileReference::generateReplacementFile):
* platform/posix/FileSystemPOSIX.cpp:
(WebCore::getFileMetadata):
* platform/win/FileSystemWin.cpp:
(WebCore::getFileMetadata):

Tools:

* TestWebKitAPI/Tests/WebCore/FileSystem.cpp:
(TestWebKitAPI::TEST_F):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp
Source/WebCore/html/FileListCreator.cpp
Source/WebCore/platform/FileMetadata.h
Source/WebCore/platform/FileSystem.cpp
Source/WebCore/platform/FileSystem.h
Source/WebCore/platform/glib/FileSystemGlib.cpp
Source/WebCore/platform/network/BlobDataFileReference.cpp
Source/WebCore/platform/network/mac/BlobDataFileReferenceMac.mm
Source/WebCore/platform/posix/FileSystemPOSIX.cpp
Source/WebCore/platform/win/FileSystemWin.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/FileSystem.cpp