Make directory path: Difference between revisions
Make directory path en FreeBASIC
(Added Wren) |
(Make directory path en FreeBASIC) |
||
Line 336:
{ [ "." = ] [ root-directory? ] [ empty? ] [ exists? ] } 1||
[ make-parent-directories dup make-directory ] unless drop ;</lang>
=={{header|FreeBASIC}}==
<lang freebasic>#ifdef __FB_WIN32__
Dim pathname As String = "Ring\docs"
#else
Dim pathname As String = "Ring/docs"
#endif
Dim As String mkpathname = "mkdir " & pathname
Dim result As Long = Shell (mkpathname)
If result = 0 Then
Print "Created the directory..."
Chdir(pathname)
Print Curdir
Else
Print "error: unable to create folder " & pathname & " in the current path."
End If
Sleep</lang>
=={{header|Gambas}}==
|