mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 14:39:36 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			483 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			483 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
Program Example26;
 | 
						|
 | 
						|
{ This program demonstrates the CreateDir and RemoveDir functions }
 | 
						|
{ Run this program twice in the same directory }
 | 
						|
 | 
						|
Uses sysutils;
 | 
						|
 | 
						|
Begin
 | 
						|
  If Not FileExists('NewDir') then
 | 
						|
    If Not CreateDir ('NewDir') Then
 | 
						|
      Writeln ('Failed to create directory !')
 | 
						|
    else
 | 
						|
      Writeln ('Created "NewDir" directory')
 | 
						|
  Else
 | 
						|
    If Not RemoveDir ('NewDir') Then
 | 
						|
      Writeln ('Failed to remove directory !')
 | 
						|
    else
 | 
						|
      Writeln ('Removed "NewDir" directory');
 | 
						|
End. |