DirExists function rename
This commit is contained in:
parent
b8acc073c1
commit
71a7576dde
|
@ -27,11 +27,11 @@ Function ioBlockWrite (Var F: File; Var Rec; dSize: LongInt; Var Res: LongInt) :
|
||||||
|
|
||||||
Function FileExist (Str: String) : Boolean;
|
Function FileExist (Str: String) : Boolean;
|
||||||
Function FileErase (Str: String) : Boolean;
|
Function FileErase (Str: String) : Boolean;
|
||||||
Function FileDirExists (Str: String) : Boolean;
|
|
||||||
Function JustFileName (Str: String) : String;
|
Function JustFileName (Str: String) : String;
|
||||||
Function JustFile (Str: String) : String;
|
Function JustFile (Str: String) : String;
|
||||||
Function JustFileExt (Str: String) : String;
|
Function JustFileExt (Str: String) : String;
|
||||||
Function JustPath (Str: String) : String;
|
Function JustPath (Str: String) : String;
|
||||||
|
Function DirExists (Str: String) : Boolean;
|
||||||
Function DirSlash (Str: String) : String;
|
Function DirSlash (Str: String) : String;
|
||||||
Function DirChange (Dir: String) : Boolean;
|
Function DirChange (Dir: String) : Boolean;
|
||||||
Procedure DirClean (Path: String; Exempt: String);
|
Procedure DirClean (Path: String; Exempt: String);
|
||||||
|
@ -391,7 +391,7 @@ Begin
|
||||||
Result := (DosError = 0) and (Attr And Directory = 0);
|
Result := (DosError = 0) and (Attr And Directory = 0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function FileDirExists (Str: String) : Boolean;
|
Function DirExists (Str: String) : Boolean;
|
||||||
Var
|
Var
|
||||||
F : File;
|
F : File;
|
||||||
Attr : Word;
|
Attr : Word;
|
||||||
|
|
|
@ -229,7 +229,7 @@ Function CheckPath (Str: String) : String;
|
||||||
Begin
|
Begin
|
||||||
While Str[Length(Str)] = PathChar Do Dec(Str[0]);
|
While Str[Length(Str)] = PathChar Do Dec(Str[0]);
|
||||||
|
|
||||||
If Not FileDirExists(Str) Then Begin
|
If Not DirExists(Str) Then Begin
|
||||||
If Session.io.GetYN ('|CR|12Directory doesn''t exist. Create? |11', True) Then Begin
|
If Session.io.GetYN ('|CR|12Directory doesn''t exist. Create? |11', True) Then Begin
|
||||||
|
|
||||||
{$I-} MkDir (Str); {$I+}
|
{$I-} MkDir (Str); {$I+}
|
||||||
|
|
|
@ -1415,7 +1415,7 @@ Begin
|
||||||
End;
|
End;
|
||||||
43 : FileErase(Param[1].S);
|
43 : FileErase(Param[1].S);
|
||||||
44 : Begin
|
44 : Begin
|
||||||
TempBool := FileDirExists(Param[1].S);
|
TempBool := DirExists(Param[1].S);
|
||||||
Store (TempBool, 1);
|
Store (TempBool, 1);
|
||||||
End;
|
End;
|
||||||
45 : Begin
|
45 : Begin
|
||||||
|
|
|
@ -138,7 +138,7 @@ End;
|
||||||
|
|
||||||
Procedure CheckDIR (Dir: String);
|
Procedure CheckDIR (Dir: String);
|
||||||
Begin
|
Begin
|
||||||
If Not FileDirExists(Dir) Then Begin
|
If Not DirExists(Dir) Then Begin
|
||||||
Screen.WriteLine ('ERROR: ' + Dir + ' does not exist.');
|
Screen.WriteLine ('ERROR: ' + Dir + ' does not exist.');
|
||||||
|
|
||||||
DisposeClasses;
|
DisposeClasses;
|
||||||
|
|
Loading…
Reference in New Issue