Vreixo Formoso
aa312cf7d7
Fix bug in IsoFileSrc implementation, related to a wrogn usage of tsearch.
...
It happens that tsearch seems to not return a pointer to the inserted element,
but a pointer to a pointer to the inserted element (that makes sense, as we
are inserted pointers...). This bug, thus, was related to a wrong
understanding of the tsearch API!
16 years ago
Vreixo Formoso
7b241176fb
Init implementation of IsoFileSrc.
...
Ecma119Image, defined for first time in this commit, is the context for image
written. It keeps the low level objects needed during image written.
IsoFileSrc is the low level object that takes care about the info needed to
write file contents to image. It takes care about reading from Stream in 2K
block chunks. To prevent the same file be written twice to image, we keep in
Ecma119Image a search tree, indexed by the triple key (fs, device, inode) that
uniquelly identifies a source.
16 years ago
Vreixo Formoso
dd83f85d09
Support for identification of source Streams.
...
We identify uniquelly a given source Stream by a triple of numbers: the
filesystem id, the device id inside the filesystem, and the inode id.
16 years ago
Vreixo Formoso
8f7222609e
Add support for generating ISO identifiers from ASCII strings.
16 years ago
Vreixo Formoso
315f1a1717
Support for charset conversion from any encoding to ASCII.
16 years ago
Vreixo Formoso
115da82c9e
First util functions, with corresponding unit test.
16 years ago
Vreixo Formoso
60d68df84c
Expose iso_node_set_hidden(), to let a node be hidden in RR/ISO or Joliet tree.
16 years ago
Vreixo Formoso
d10ed353e2
Implement function to recursively add a dir to an iso tree.
...
This commit also to the following changes:
- create_node() on builder never frees the IsoFileSource, it is responsability
of the caller to free it.
- Recursive addition options added to IsoImage (not exposed to public API yet)
- create_node() takes care about follow_symlinks
- Added little demo program to test it.
16 years ago
Vreixo Formoso
0306bb5daf
Redefine readdir() on IsoFileSource, to skip "." and ".." dirs.
16 years ago
Vreixo Formoso
008871cfd8
Additon of nodes based on Builder. Pass Image as a parameter to builder methods.
16 years ago
Vreixo Formoso
e28f924913
Ensure local filesystem is deleted when needed.
16 years ago
Vreixo Formoso
b03fbf0ee0
Implement function to get node from path on image. Little unit test too.
16 years ago
Vreixo Formoso
f04ddb4435
Add getter and setter for sort_weight.
16 years ago
Vreixo Formoso
70b9b87150
Expose iso_node_get_type().
16 years ago
Vreixo Formoso
27670f8d3a
More tests related with iso tree.
16 years ago
Vreixo Formoso
7d417e9fa6
Added a mocked filesystem to simulate a real filesystem in tests.
16 years ago
Vreixo Formoso
45f4d0a29e
Add function to add an exiting file to the iso tree.
...
Node is created using a builder. Default builder and filesystem is added
to IsoImage. Later we should expose setters for this atts.
16 years ago
Vreixo Formoso
c93fa154d5
Getters and setters for time attributes on IsoNode.
16 years ago
Vreixo Formoso
7f9c5c9065
Unit test for tree functions. Little fixes.
16 years ago
Vreixo Formoso
5df6b2c3d2
Fix bug in tree functions.
16 years ago
Vreixo Formoso
dad43d9ede
Add some unit tests related to IsoNode.
16 years ago
Vreixo Formoso
5abb569e0c
Keep children sorted when renaming a node.
16 years ago
Vreixo Formoso
b2d41de603
Allow adding of special files to iso tree node.
16 years ago
Vreixo Formoso
007be29c6d
Fix little bug: ensure number of children is incremented when adding a
...
new node to a dir.
16 years ago
Vreixo Formoso
d4deb4866f
Take care about duplicate node names in iso_node_set_name().
16 years ago
Vreixo Formoso
06db9a3c73
Free destination on IsoSymlinks.
16 years ago
Vreixo Formoso
f62c34776f
Begin implementation of tree operations.
16 years ago
Vreixo Formoso
8e7fe9b5a5
Add replace flag to iso_dir_add_node().
16 years ago
Vreixo Formoso
14f4aa7d07
Init builder implementation.
16 years ago
Vreixo Formoso
6616eae76b
Unref Stream when freeing a IsoFile.
16 years ago
Vreixo Formoso
8edc9f2639
Implementation of IsoStream for IsoFileSources.
16 years ago
Vreixo Formoso
b35e090c1b
Add stat() function to IsoFileSource interface.
16 years ago
Vreixo Formoso
0ba8a7a85e
Add message queue facilities. Each IsoImage will have its own msg queue.
16 years ago
Vreixo Formoso
d916b60172
Add getters and setters for image properties, together with unit tests.
16 years ago
Vreixo Formoso
c83bac7d9e
Add IsoImage, equivalent to old libisofs volume and volset.
...
IsoImage will be a context for image creation and modification.
16 years ago
Vreixo Formoso
f2deae8503
Set parent of a root node to point to itself.
...
This way we can ensure a root node is not added to another dir.
16 years ago
Vreixo Formoso
c587c79220
Ensure parent is set to NULL on children of a deleted directory.
16 years ago
Vreixo Formoso
0c03ad051b
Add function to create a new root.
16 years ago
Vreixo Formoso
79c37ff193
Little changes.
16 years ago
Vreixo Formoso
5fa2490a48
Take and remove functions based on iterator.
16 years ago
Vreixo Formoso
baa6238579
Unit test for iso_node_take().
16 years ago
Vreixo Formoso
78fba4c14f
Add unit test for dir iteration. Implementation of iso_dir_iter_free().
16 years ago
Vreixo Formoso
5ec93b50f4
Add functions to remove nodes from a dir. Handle deletion of dirs
...
propertly.
16 years ago
Vreixo Formoso
051538b5c2
Add functions to iterate over directory children.
16 years ago
Vreixo Formoso
e068fd1cf6
Getter for number of children in a dir.
16 years ago
Vreixo Formoso
a4f283fac6
Functions to add and get a node inside a dir.
16 years ago
Vreixo Formoso
3c7f1285d6
Add default skel for unit tests. Move test programs to demo.
16 years ago
Vreixo Formoso
efff783602
Added getters/setters from IsoNode permissions and owners.
16 years ago
Vreixo Formoso
b9152421f3
Define and document IsoStream interface.
16 years ago
Vreixo Formoso
100919a5cb
Fix little bug, close() must mark a file as closed!
16 years ago