ADDED: path_segments/2 for portable reasoning about path components.
The platform-specific directory separator is taken into account. The clean representation of segments as a list simplifies reasoning.
This commit is contained in:
@@ -870,6 +870,10 @@ impl MachineState {
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
&SystemClauseType::DirectorySeparator => {
|
||||
let addr = self.heap.put_constant(Constant::Char(std::path::MAIN_SEPARATOR));
|
||||
self.unify(self[temp_v!(1)], addr);
|
||||
}
|
||||
&SystemClauseType::MakeDirectory => {
|
||||
let directory = self.heap_pstr_iter(self[temp_v!(1)]).to_string();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user