0 Members and 1 Guest are viewing this topic.
function newMtime(fn:string; var previous:Tdatetime):boolean;function dirCrossing(s:string):boolean;function forceDirectory(path:string;overwrite:boolean=FALSE):boolean; //mod by marsfunction moveToBin(fn:string; force:boolean=FALSE):boolean;function uri2disk(url:string; root:Tfile=NIL):string;......implementation....function forceDirectory(path:string;overwrite:boolean=FALSE):boolean; //mod by marsvar s: string;beginresult:=TRUE;path:=excludeTrailingPathDelimiter(path);if path = '' then exit;try if overwrite then movetobin(path,TRUE); //add by marsexcept end;if directoryExists(path) then exit;s:=ExtractFilePath(path);forceDirectory(s);result:=CreateDir(path);end; // forceDirectory
if name = 'mkdir' then spaceIf(forceDirectory(uri2diskMaybeFolder(p),isTrue(par('overwrite')))); //mod by mars