pub fn create(path: &Path, contents: impl AsRef<[u8]>) -> Result<()>Expand description
Create a new executable file with fully synchronized contents.
Existing entries are never replaced. On Unix, owner, group, and other users receive executable permissions. On other platforms, executable selection is platform-defined. Those platforms typically use the filename extension. The file is still created and synchronized without permission changes.
ยงErrors
Returns a contextual error when the path already exists. Content, permission, and metadata persistence failures are also reported.