mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibCore: Move Core::Stream::File::exists()
to Core::File
`Core::Stream::File` shouldn't hold any utility methods that are unrelated to constructing a `Core::Stream`, so let's just replace the existing `Core::File::exists` with the nicer looking implementation.
This commit is contained in:
parent
bd272e638c
commit
2fc2025f49
10 changed files with 14 additions and 18 deletions
|
@ -38,7 +38,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.parse(arguments);
|
||||
|
||||
if (filename) {
|
||||
if (!Core::File::exists(filename) || Core::File::is_directory(filename)) {
|
||||
if (!Core::File::exists({ filename, strlen(filename) }) || Core::File::is_directory(filename)) {
|
||||
warnln("File does not exist or is a directory: {}", filename);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue