Next: pathname api, Up: pathname [Contents][Index]
pathname traitType of the pathname trait. Instances of this type are meant to be handed by value to
function calls.
Type of methods table for the pathname trait. It has the following fields:
ccname_trait_method_type(ccstructs_pathname_T, asciiz) * asciizPointer to function implementing the asciiz() method.
ccname_trait_method_type(ccstructs_pathname_T, is_static) * is_staticPointer to function implementing the is_static() method.
ccname_trait_method_type(ccstructs_pathname_T, is_absolute) * is_absolutePointer to function implementing the is_absolute() method.
ccname_trait_method_type(ccstructs_pathname_T, is_relative) * is_relativePointer to function implementing the is_relative() method.
ccname_trait_method_type(ccstructs_pathname_T, is_normalised) * is_normalisedPointer to function implementing the is_normalised() method.
ccname_trait_method_type(ccstructs_pathname_T, is_realpath) * is_realpathPointer to function implementing the is_realpath() method.
ccname_trait_method_type(ccstructs_pathname_T, dtor) * dtorPointer to function implementing the dtor() method.
ccname_trait_method_type(ccstructs_pathname_T, dumpable) * dumpablePointer to function implementing the dumpable() method.
ccname_trait_method_type(ccstructs_pathname_T, serialiser) * serialiserPointer to function implementing the serialiser() method.
ccname_trait_method_type(ccstructs_pathname_T, deserialiser) * deserialiserPointer to function implementing the deserialiser() method.
Type of functions implementing the asciiz() method. Return an instance of
ccmem_asciiz_t holding an ASCIIZ representation of the pathname. If an error occurs
generating the representation: raise an exception by performing a non–local exit to L.
Type of functions implementing the is_static() method. In general, the user of I
should make a copy of the ASCIIZ pathname representation, returned by the asciiz() method,
if it needs to keep it independently from the extent (the lifetime) of I; but if this function
returns true: it can rely on the existence of the representation for the time it needs it.
Type of functions implementing the is_absolute() method. When successful: return true is
the pathname is absolute; otherwise return false. If an error occurs (for example: because this
method is not implemented): raise an exception by performing a non–local exit to L.
Type of functions implementing the is_relative() method. When successful: return true is
the pathname is relative; otherwise return false. If an error occurs (for example: because this
method is not implemented): raise an exception by performing a non–local exit to L.
Type of functions implementing the is_normalised() method. When successful: return true
is the pathname has been normalised with a procedure not involving access to the file system;
otherwise return false. If an error occurs (for example: because this method is not
implemented): raise an exception by performing a non–local exit to L.
Examples of normalisation for a Unix pathname: removal of redundant dots; removal of redundant double–dots; removal of double–slashes.
Type of functions implementing the is_realpath() method. When successful: return true is
the pathname has been normalised with a function like the standard realpath(); otherwise
return false. If an error occurs (for example: because this method is not implemented): raise
an exception by performing a non–local exit to L.
Type of functions implementing the dtor() method. Return an instance of the
ccstructs_dtor_T trait that destroys the underlying pathname representation;
The dtor trait.
Type of functions implementing the dumpable() method. Return an instance of the
ccstructs_dumpable_T that prints the underlying pathname representation; The dumpable trait. If an error occurs creating the trait (for example: because
the trait is not implemented): raise an exception by performing a non–local exit to L.
Type of functions implementing the serialiser() method. Return an instance of the
ccstructs_serialiser_T that serialises the underlying pathname representation;
The serialiser trait. If an error occurs creating the trait (for
example: because the trait is not implemented): raise an exception by performing a non–local
exit to L.
Type of functions implementing the deserialiser() method. Return an instance of the
ccstructs_deserialiser_T that deserialises the underlying pathname representation;
The deserialiser trait. If an error occurs creating the trait
(for example: because the trait is not implemented): raise an exception by performing a
non–local exit to L.
Next: pathname api, Up: pathname [Contents][Index]
This document describes version 0.3.0-devel.3 of CCStructs.