fn init_data() -> Result<FileData>
{
	let mut args = env::args().skip(1);
	if args.len() > 0
	{	
		let path_str = args.next().unwrap_or(String::new());
		let path_str_copy = path_str.clone();
		let path = Path::new(&path_str_copy);
		if path.exists() == false
		{
			Ok(FileData::new_with_name(path_str))
		}
		else 
		{
			FileData::from(path_str)    
		}
	}
	else
	{
		Ok(FileData::new())
	}
}
//create a new data object from cmd args
create a new data object from cmd args
create a new data object from cmd args
fn init_data() -> Result<FileData>
{
	let mut args = env::args().skip(1);
	if args.len() > 0
	{	
		let path_str = args.next().unwrap_or(String::new());
		let path_str_copy = path_str.clone();
		let path = Path::new(&path_str_copy);
		if path.exists() == false
		{
			Ok(FileData::new_with_name(path_str))
		}
		else 
		{
			FileData::from(path_str)    
		}
	}
	else
	{
		Ok(FileData::new())
	}
}
fn init_data ( ) -> Result < FileData > { let mut args = env :: args ( ) . skip ( 1 ) ; if args . len ( ) > 0 { let path_str = args . next ( ) . unwrap_or ( String :: new ( ) ) ; let path_str_copy = path_str . clone ( ) ; let path = Path :: new ( & path_str_copy ) ; if path . exists ( ) == false { Ok ( FileData :: new_with_name ( path_str ) ) } else { FileData :: from ( path_str ) } } else { Ok ( FileData :: new ( ) ) } }
create a new data object from cmd args
create a new data object from cmd args