jbe/bsw@0: --[[-- jbe/bsw@0: path = -- string containing a (file) path jbe@468: encode.file_path( jbe/bsw@0: base_path, jbe/bsw@0: element1, -- next part of the path jbe/bsw@0: element2, -- next part of the path jbe/bsw@0: ... jbe/bsw@0: ) jbe/bsw@0: jbe/bsw@0: This function does the same as encode.concat_file_path, except that all arguments but the first are encoded using the encode.file_path_element function. jbe/bsw@0: jbe/bsw@0: --]]-- jbe/bsw@0: jbe/bsw@0: function encode.file_path(base, ...) -- base argument is not encoded jbe/bsw@0: local raw_elements = {...} jbe/bsw@0: local encoded_elements = {} jbe/bsw@0: for i = 1, #raw_elements do jbe/bsw@0: encoded_elements[i] = encode.file_path_element(raw_elements[i]) jbe/bsw@0: end jbe@64: return encode.concat_file_path(base, table.unpack(encoded_elements)) jbe/bsw@0: end