Skip to content

Commit

Permalink
Release share v0.50.1 (2023-11-05)
Browse files Browse the repository at this point in the history
This release bring many enhancements to "lib/memfs", a library for caching
file system in memory.

===  Enhancements

* lib/memfs: return nil in AddChild if file not exist
* lib/memfs: quote the path in the returned error
* lib/memfs: add method Child to Node
* lib/memfs: call the Init method in the embedded file
* lib/memfs: include empty directory
* lib/memfs: re-scan directory content on Node’s Update
  • Loading branch information
shuLhan committed Nov 5, 2023
1 parent cdf63b6 commit 4160c37
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
64 changes: 64 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,70 @@ link:CHANGELOG_2018-2019.html[Changelog from 2018 to 2019^].
This is changelog for share module since v0.1.0 until v0.11.0.


[#v0_50_1]
== share v0.50.1 (2023-11-05)

This release bring many enhancements to "lib/memfs", a library for caching
file system in memory.

[#v0_50_1__enhancements]
=== Enhancements
lib/memfs: return nil in AddChild if file not exist::
+
--
In case the node being added is a symlink, and the symlink is broken,
the AddChild will return an error "fs.ErrNotExist".
In this changes we check for fs.ErrNotExist and return nil without an
error, so the user of AddChild can skip adding the node to the parent.
--
lib/memfs: quote the path in the returned error::
+
--
Error message should at least contains 4W in the following order,
WHEN WHO/WHERE WHAT WHY
By quoting, user or machine can parse that the value inside quote
is the value that cause the error (the what), not part of the cause of
the error (the why).
--
lib/memfs: add method Child to Node::
+
The Child method return the child node based on its node.
lib/memfs: call the Init method in the embedded file::
+
--
By calling the Init method, the regular expression for include and
excludes are initialized, which allow using any method of MemFS instance
later, for example the Watch method.
While at it, fix the fields alignment in template code format.
--
lib/memfs: include empty directory::
+
--
Even thought empty directory does not contains file, from the parent
node _it is_ part of their content.
Also, there is a use case where memfs use as virtual file system (VFS),
as a layer with file system, where user can view list of directory,
create a directory or file on the fly.
If we skip scanning empty directory, that directory will not be visible.
--
lib/memfs: re-scan directory content on Node's Update::
+
Previously, only node content get updated.
In case in the MemFS, user set "Options.TryDirect" to true, the directory
content should be updated too on "MemFS.Get".
[#v0_50_0]
== share v0.50.0 (2023-10-04)
Expand Down
2 changes: 1 addition & 1 deletion share.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ package share

var (
// Version of this module.
Version = `0.50.0`
Version = `0.50.1`
)

0 comments on commit 4160c37

Please sign in to comment.