internal bool xExtract(string OutLocation, bool SubItems) { if (OutLocation == null || OutLocation == "") { return(false); } OutLocation = OutLocation.xExtractLegitPath(); if (!VariousFunctions.xCheckDirectory(OutLocation)) { return(false); } GDFContents xConts = xRead(); foreach (GDFFile x in xConts.Files) { DJsIO y = new DJsIO(true); try { if (x.xExtract(y)) { y.Close(); VariousFunctions.MoveFile(y.FileNameLong, OutLocation + "/" + x.Name); } } catch { y.Close(); } VariousFunctions.DeleteFile(y.FileNameLong); } foreach (GDFFolder x in xConts.xFolders) { try { x.xExtract(OutLocation + "/" + x.Name, SubItems); } catch { } } return(true); }
/// <summary> /// Extract the file /// </summary> /// <param name="OutLocation"></param> /// <returns></returns> public bool Extract(string OutLocation) { if (xDrive.ActiveCheck()) { return(false); } bool xReturn = false; DJsIO xIO = new DJsIO(true); try { xReturn = xExtract(ref xIO); xIO.Close(); if (xReturn) { xReturn = VariousFunctions.MoveFile(xIO.FileNameLong, OutLocation); } } catch { xIO.Close(); xReturn = false; } VariousFunctions.DeleteFile(xIO.FileNameLong); xDrive.xActive = false; return(xReturn); }
/// <summary> /// Extract a file /// </summary> /// <param name="OutLocale"></param> /// <returns></returns> public bool Extract(string OutLocale) { if (!xref.ActiveCheck()) { return(false); } DJsIO xIO = new DJsIO(true); if (!xExtract(xIO)) { xIO.Close(); VariousFunctions.DeleteFile(xIO.FileNameLong); return(xref.xActive = false); } xIO.Close(); bool xSuccess = VariousFunctions.MoveFile(xIO.FileNameLong, OutLocale); VariousFunctions.DeleteFile(xIO.FileNameLong); return(xSuccess & !(xref.xActive = false)); }