private void btn_makeFile_Click(object sender, EventArgs e) { saveFileDialog1.FileName = "D:\\Test\\test"; saveFileDialog1.DefaultExt = ".txt"; saveFileDialog1.ShowDialog(); var filename = saveFileDialog1.FileName; var lol = new FSHandler(filename); }
private void btn_add_Click(object sender, EventArgs e) { var iNode = new INode(); byte[] ftype = Encoding.ASCII.GetBytes(GetDate(DateTime.Now.Date)); iNode.CreationDate = BitConverter.ToInt64(ftype, 0); ftype = Encoding.ASCII.GetBytes(GetDate(DateTime.Now.Date)); iNode.ChangeDate = BitConverter.ToInt64(ftype, 0); iNode.Flag.Hidden = chb_hidden.Checked; iNode.Flag.System = chb_system.Checked; iNode.Flag.Type = chb_dir.Checked; iNode.Size = (int)num_size.Value * 1024; iNode.GID = 1; iNode.UID = 1; iNode.Rights = 198; iNode.Name = tb_filename.Text; var handler = new FSHandler("D:\\Test\\test.txt"); handler.AddFile(iNode); }