rustyroad 1.0.26

Rusty Road is a framework written in Rust that is based on Ruby on Rails. It is designed to provide the familiar conventions and ease of use of Ruby on Rails, while also taking advantage of the performance and efficiency of Rust.
Documentation
use std::fs::File;
use std::io::Error;

/// # Name: create_file
/// # Description: Creates a file
/// # Arguments:
/// * `name` - The name of the file
pub fn create_file(name: &str) -> Result<(), Error> {
    let result = match File::create(name) {
        Ok(_) => Ok(()),
        Err(e) => Err(e),
    };
    match result {
        Ok(_) => Ok(()),
        Err(e) => {
            println!("Error creating file: {:?}", e);
            Err(e)
        }
    }
}