We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Depends on
Add file and moving capabilities to Bend by implementing a move function that interfaces with the HVM's IO system.
move
move(source, destination, overwrite)
Moves a file or directory from the source path to the destination path.
source
destination
overwrite
true
false
# Moving a file result = move("old_file.txt", "new_file.txt") match result: case Ok(_): print("File moved successfully") case Err(e): print(f"Error moving file: {e}")
# Moving a directory result = move("old_dir", "new_dir", overwrite=True) match result: case Ok(_): print("Directory moved successfully") case Err(e): print(f"Error moving directory: {e}")
Error Handling:
FileNotFound
PermissionDenied
FileExists
Type Checking:
HVM Integration:
Documentation:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Depends on
Add file and moving capabilities to Bend by implementing a
move
function that interfaces with the HVM's IO system.1.
move(source, destination, overwrite)
Moves a file or directory from the
source
path to thedestination
path.Parameters
source
: Path of the file or directory to be moveddestination
: Path where the file or directory should be moved tooverwrite
: Iftrue
, overwrites the destination if it exists. Otherwise, returns an error if the destination exists. Defaults tofalse
Example Usage
Implementation Details
Error Handling:
FileNotFound
,PermissionDenied
,FileExists
).Type Checking:
HVM Integration:
Documentation:
move
function.Integration
move
function.Considerations
Testing
The text was updated successfully, but these errors were encountered: