Skip to content

Commit

Permalink
2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bcpeinhardt committed Sep 24, 2024
1 parent c097a30 commit 0d0f2f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## Unreleased

## v2.2.0 - 23 September 2024
- Add `copy` function which can copy a file or a directory.
- Deprecate `rename_file` and `rename_directory` in favor of `rename` which does both.
- Refactor `copy_directory` to make fewer file system calls.
Expand Down
2 changes: 1 addition & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "simplifile"
version = "2.1.0"
version = "2.2.0"
description = "Basic file operations that work on all targets"

licences = ["Apache-2.0"]
Expand Down
8 changes: 6 additions & 2 deletions src/simplifile.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ pub fn is_directory(filepath: String) -> Result(Bool, FileError)
pub fn create_directory(filepath: String) -> Result(Nil, FileError)

/// Create a symbolic link called symlink pointing to target.
/// Footgun Alert: the target path is relative to *the symlink*,
///
/// ### Footgun Alert
/// the target path is relative to *the symlink*,
/// not the current working directory. I will likely be updating
/// the label on the next major version to reflect that.
///
Expand Down Expand Up @@ -496,7 +498,9 @@ pub fn create_directory_all(dirpath: String) -> Result(Nil, FileError) {
fn do_create_dir_all(dirpath: String) -> Result(Nil, FileError)

/// Copy a file or a directory to a new path. Copies directories recursively.
/// Performance note: This function does work to determine if the src path
///
/// ### Performance Note
/// This function does work to determine if the src path
/// points to a file or a directory. Consider using one of the the dedicated
/// functions `copy_file` or `copy_directory` if you already know which one you need.
pub fn copy(src src: String, dest dest: String) -> Result(Nil, FileError) {
Expand Down

0 comments on commit 0d0f2f0

Please sign in to comment.