Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
MasterObject

Method MasterObject()->program_path_to_name()


Method program_path_to_name

string program_path_to_name(string path, void|string module_prefix, void|string module_suffix, void|string object_suffix)

Description

Converts a module path on the form "Foo.pmod/Bar.pmod" or "/path/to/pike/lib/modules/Foo.pmod/Bar.pmod" to a module identifier on the form "Foo.Bar".

If module_prefix or module_suffix are given, they are prepended and appended, respectively, to the returned string if it's a module file (i.e. ends with ".pmod" or ".so"). If object_suffix is given, it's appended to the returned string if it's an object file (i.e. ends with ".pike").