mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 11:36:22 +00:00
Everywhere: Use LibFileSystem
where trivial
This commit is contained in:
parent
edab0cbf41
commit
1d24f394c6
Notes:
sideshowbarker
2024-07-16 22:54:10 +09:00
Author: https://github.com/cammo1123
Commit: 1d24f394c6
Pull-request: https://github.com/SerenityOS/serenity/pull/17789
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/caoimhebyrne
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/pascalpuffke
Reviewed-by: https://github.com/timschumi ✅
115 changed files with 275 additions and 228 deletions
|
@ -41,4 +41,4 @@ set(GENERATED_SOURCES
|
|||
)
|
||||
|
||||
serenity_lib(LibSQL sql)
|
||||
target_link_libraries(LibSQL PRIVATE LibCore LibIPC LibSyntax LibRegex)
|
||||
target_link_libraries(LibSQL PRIVATE LibCore LibFileSystem LibIPC LibSyntax LibRegex)
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
#include <LibSQL/SQLClient.h>
|
||||
|
||||
#if !defined(AK_OS_SERENITY)
|
||||
# include <LibCore/DeprecatedFile.h>
|
||||
# include <LibCore/Directory.h>
|
||||
# include <LibCore/SocketAddress.h>
|
||||
# include <LibCore/StandardPaths.h>
|
||||
# include <LibCore/System.h>
|
||||
# include <LibFileSystem/FileSystem.h>
|
||||
#endif
|
||||
|
||||
namespace SQL {
|
||||
|
@ -24,7 +24,7 @@ namespace SQL {
|
|||
// This is heavily based on how SystemServer's Service creates its socket.
|
||||
static ErrorOr<int> create_database_socket(DeprecatedString const& socket_path)
|
||||
{
|
||||
if (Core::DeprecatedFile::exists(socket_path))
|
||||
if (FileSystem::exists(socket_path))
|
||||
TRY(Core::System::unlink(socket_path));
|
||||
|
||||
# ifdef SOCK_NONBLOCK
|
||||
|
@ -102,7 +102,7 @@ static ErrorOr<void> launch_server(DeprecatedString const& socket_path, Deprecat
|
|||
|
||||
static ErrorOr<bool> should_launch_server(DeprecatedString const& pid_path)
|
||||
{
|
||||
if (!Core::DeprecatedFile::exists(pid_path))
|
||||
if (!FileSystem::exists(pid_path))
|
||||
return true;
|
||||
|
||||
Optional<pid_t> pid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue