summaryrefslogtreecommitdiff
path: root/Userland/Utilities/cp.cpp
AgeCommit message (Collapse)Author
2021-12-20cp: Print proper error message with strerrorPerikiyoXD
When cp fails, now it prints an error string (strerror) instead of an error code.
2021-11-28Everywhere: Use default execpromises argument for Core::System::pledgeBrian Gianforcaro
2021-11-26cp: Port to LibMain :^)Andreas Kling
2021-11-26Userland: Use Core::ArgsParser's Vector<StringView> API everywhereAndreas Kling
...and remove the Vector<String> variant since there are no remaining users of this API.
2021-11-08LibCore: Use ErrorOr<T> for Core::File::copy_file()Andreas Kling
2021-08-18Utilities: Implement -p flag for cpJean-Baptiste Boric
2021-06-30AK+Everywhere: Add and use static APIs for LexicalPathMax Wipfli
The LexicalPath instance methods dirname(), basename(), title() and extension() will be changed to return StringView const& in a further commit. Due to this, users creating temporary LexicalPath objects just to call one of those getters will recieve a StringView const& pointing to a possible freed buffer. To avoid this, static methods for those APIs have been added, which will return a String by value to avoid those problems. All cases where temporary LexicalPath objects have been used as described above haven been changed to use the static APIs.
2021-06-21cp: Copy sources into destination if it is already a directorySam Atkins
Previously, copying a file to a directory, like this: ```cp README.md Desktop``` correctly copied it to Desktop/README.md, but would fail if the source was also a directory, for example: ```cp -R Documents Desktop``` Now, that correctly copies it to Desktop/Documents, as you would expect. :^)
2021-06-01Userland: Replace most printf-style APIs with AK::Format APIs :^)Linus Groh
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-02-21cp: Use Core::File::copy_file_or_directoryMițca Dumitru
2021-02-20Userland: Support moving files between different mounted filesystemsBui Quang Minh
In case we cannot use rename() because of cross-device error, copy file to the destination then unlink the old source file.
2021-01-12Userland: Move command-line utilities to Userland/Utilities/Andreas Kling