// Generated by Haxe 4.3.1
package sys;

import haxe.root.*;

@SuppressWarnings(value={"rawtypes", "unchecked"})
public class FileSystem extends haxe.lang.HxObject
{
	public FileSystem(haxe.lang.EmptyObject empty)
	{
	}
	
	
	public FileSystem()
	{
		//line 29 "/usr/share/haxe/std/java/_std/sys/FileSystem.hx"
		sys.FileSystem.__hx_ctor_sys_FileSystem(this);
	}
	
	
	protected static void __hx_ctor_sys_FileSystem(sys.FileSystem __hx_this)
	{
	}
	
	
	public static boolean exists(java.lang.String path)
	{
		//line 31 "/usr/share/haxe/std/java/_std/sys/FileSystem.hx"
		return new java.io.File(haxe.lang.Runtime.toString(path)).exists();
	}
	
	
	public static void createDirectory(java.lang.String path)
	{
		//line 103 "/usr/share/haxe/std/java/_std/sys/FileSystem.hx"
		java.io.File f = new java.io.File(haxe.lang.Runtime.toString(path));
		//line 104 "/usr/share/haxe/std/java/_std/sys/FileSystem.hx"
		if ((  ! (f.isDirectory())  &&  ! (f.mkdirs())  )) 
		{
			//line 105 "/usr/share/haxe/std/java/_std/sys/FileSystem.hx"
			throw ((java.lang.RuntimeException) (haxe.Exception.thrown(( "Cannot create dir " + path ))) );
		}
		
	}
	
	
}


