func main(args)
{
    //FS.Local.CreateDirectory("data" / "a");
    //FS.WriteAllText(FS.Local,"data/a/readme.txt", "This is not a drill");
    //FS.Local.DeleteDirectoryRecurse("data");
    //FS.Local.DeleteFile("data/a/readme.txt");
    //FS.Local.DeleteDirectory("data/a");
    //FS.Local.MoveFile("data/a/readme.txt","data/myfile.txt");
    Console.WriteLine(FS.Local.FileExists("data/myfile.txt"));
    Console.WriteLine(FS.Local.DirectoryExists("data"));
    Console.WriteLine(FS.Local.RegularFileExists("/dev/sda"));
    Console.WriteLine(FS.Local.BlockDeviceExists("/dev/sda"));
    
    Console.WriteLine(FS.Local.GetDate("data/myfile.txt").LastWrite);
    
    
    //var strm = FS.Local.OpenFile("data/myfile.bin","wb"); //use rb for reading
    //var ba = new ByteArray(1);
    //ba[0] = 42;
    //strm.WriteBlock(ba,0,ba.Length); //use ReadBlock for reading data, src.CopyTo(strm); to copy src stream to this stream
    //strm.Close();
    
    //subdir filesystem
    FS.Local.CreateDirectory("subdir");
    var sdfs = new SubdirFilesystem(FS.Local, "subdir");
    FS.WriteAllText(sdfs,/ "myfile.txt", "This is a file in the subdir filesystem");

    FS.WriteAllText(FS.Local, Env.Documents / "My CrossLang Doc.txt", "This is a document");

    var fullPath = FS.MakeFull("../data.txt");
    Console.WriteLine(fullPath);
    Console.WriteLine(fullPath.GetParent());
    Console.WriteLine(fullPath.ChangeExtension(null).GetFileName());

    var strm = FS.Local.OpenFile(Env.Downloads/"myarchive.crvm","wb");
    FS.CreateArchive(sdfs, strm, "myarchive", "1.0.0.0-prod", "{}");
    strm.Close();
    var strm = FS.Local.OpenFile(Env.Downloads/"myarchive.crvm","rb");
    
    var sdfs2 = new SubdirFilesystem(FS.Local, "subdir2");
    FS.ExtractArchive(strm, sdfs2);

    strm.Close();
}