]> Kevux Git Server - fll/commit
Update: Implement file statistics flag enumeration, dereferencing/no-dereferencing...
authorKevin Day <thekevinday@gmail.com>
Thu, 14 Apr 2022 04:04:24 +0000 (23:04 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 14 Apr 2022 04:04:24 +0000 (23:04 -0500)
commit9d623c7067078dccd568ba2f08dc20014a5be74f
treea4dea0db2265c7ef3e8d4c8bdaddc343f93f04eb
parent1147ef7cc5ae6655a124541647456cf994bb40c8
Update: Implement file statistics flag enumeration, dereferencing/no-dereferencing, and also use F_stream_not.

While writing the unit tests for the f_file project I noticed an oversight in the design.

The dereferencing logic needs to be designated rather than assumed.
This requires changing the parameters to functions.
Now is the time to break the API as the official stable release is not made.

This takes the minimalistic approach to changing the API.
I can imagine better designs where I pass the file stat flag everywhere rather than sometimes passing the file stat flag and other times passing a dereference boolean.
This is a larger change in which I wish to avoid.
Improvements to this can be made for the next development series.

The roles can be merged into the file statistics flags.
The roles of group and owner are separated.
For the purposes of limiting changes, both owner and group are treated the same.
The next development cycle will be expected to improve upon this.

The exclusive boolean is now merged into the file statistics flags.

The fake program must be updated.
A new functionality for designating when to dereference and when not to.
The default behavior is to dereference.
This means that the new option is "no_dereference".
To always favor the dereference by default, the file statistics flag is a "reference" flag used to designate that something must not dereference.

The f_file_descriptor() function should return F_stream_not.
This makes more sense as it only fails when the file descriptor is not a valid file stream.

As mentioned above, I was in the process of updating the tests.
This includes some test updates.
64 files changed:
level_0/f_directory/tests/unit/c/test-directory-exists.c
level_0/f_directory/tests/unit/c/test-directory-exists_at.c
level_0/f_directory/tests/unit/c/test-directory-is.c
level_0/f_directory/tests/unit/c/test-directory-is_at.c
level_0/f_directory/tests/unit/c/test-directory-touch.c
level_0/f_directory/tests/unit/c/test-directory-touch_at.c
level_0/f_file/c/file.c
level_0/f_file/c/file.h
level_0/f_file/c/file/common.h
level_0/f_file/c/private-file.c
level_0/f_file/data/build/defines
level_0/f_file/data/build/settings-mocks
level_0/f_file/tests/unit/c/mock-file.c
level_0/f_file/tests/unit/c/mock-file.h
level_0/f_file/tests/unit/c/test-file-clone.c
level_0/f_file/tests/unit/c/test-file-copy.c
level_0/f_file/tests/unit/c/test-file-descriptor.c
level_0/f_file/tests/unit/c/test-file-descriptor.h
level_0/f_file/tests/unit/c/test-file-exists.c
level_0/f_file/tests/unit/c/test-file-exists.h
level_0/f_file/tests/unit/c/test-file-exists_at.c
level_0/f_file/tests/unit/c/test-file-exists_at.h
level_0/f_file/tests/unit/c/test-file-flush.c
level_0/f_file/tests/unit/c/test-file-flush.h
level_0/f_file/tests/unit/c/test-file-group_read.c
level_0/f_file/tests/unit/c/test-file-is.c
level_0/f_file/tests/unit/c/test-file-is_at.c
level_0/f_file/tests/unit/c/test-file-mode_read.c
level_0/f_file/tests/unit/c/test-file-owner_read.c
level_0/f_file/tests/unit/c/test-file-touch.c
level_0/f_file/tests/unit/c/test-file-touch_at.c
level_0/f_file/tests/unit/c/test-file.c
level_1/fl_directory/c/directory.c
level_1/fl_directory/c/directory.h
level_1/fl_directory/c/directory/common.h
level_1/fl_directory/c/private-directory.c
level_1/fl_directory/c/private-directory.h
level_2/fll_execute/c/execute.c
level_2/fll_file/c/file.c
level_2/fll_file/c/file.h
level_2/fll_file/c/private-file.c
level_2/fll_file/c/private-file.h
level_3/byte_dump/c/byte_dump.c
level_3/control/c/private-control.c
level_3/controller/c/controller/private-controller.c
level_3/controller/c/rule/private-rule.c
level_3/controller/c/thread/private-thread.c
level_3/controller/c/thread/private-thread_entry.c
level_3/controller/c/thread/private-thread_process.c
level_3/fake/c/private-build-library.c
level_3/fake/c/private-build-object.c
level_3/fake/c/private-build-objects.c
level_3/fake/c/private-build-program.c
level_3/fake/c/private-build-skeleton.c
level_3/fake/c/private-build.c
level_3/fake/c/private-common.c
level_3/fake/c/private-common.h
level_3/fake/c/private-fake.c
level_3/fake/c/private-make-operate_process.c
level_3/fake/c/private-make-operate_process_type.c
level_3/fake/c/private-make-operate_validate.c
level_3/fake/documents/fakefile.txt
level_3/fake/specifications/fakefile.txt
level_3/utf8/c/utf8.c