-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
ballerina-platform/module-ballerina-file
#576Labels
Area/LibraryCredits/30HacktoberfestReason/EngineeringMistakeThe issue occurred due to a mistake made in the past.The issue occurred due to a mistake made in the past.Type/Buggood first issueGood for newcomersGood for newcomersmodule/file
Description
Description:
$Subject.
$Subject. This doesn't return any error and works as a success case. However, the file is not copied to the destination. This should ideally copy the file by creating required dirs or return an error.
This only happens when the destination path directories does not exist.
Steps to reproduce:
- create a insert.sql file in package dir.
- run the following code.
import ballerina/file;
import ballerina/io;
public function main() returns error? {
string sourcePath = "insert.sql";
string destPath = "foo/insert.sql";
file:Error? copy = file:copy(sourcePath, destPath);
if copy is file:Error {
io:println(copy.message());
}
io:println("done");
}
Affected Versions:
OS, DB, other environment details and versions:
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area/LibraryCredits/30HacktoberfestReason/EngineeringMistakeThe issue occurred due to a mistake made in the past.The issue occurred due to a mistake made in the past.Type/Buggood first issueGood for newcomersGood for newcomersmodule/file
Type
Projects
Status
Done