Make directory path: Difference between revisions
Content added Content deleted
m (added whitespace before the TOC (table of contents), added a ;Task: (bold) header.) |
|||
Line 354: | Line 354: | ||
mkdir_p also takes an array of pathnames instead of a single pathname as an argument. |
mkdir_p also takes an array of pathnames instead of a single pathname as an argument. |
||
mkdir_p is aliased as: mkpath, makedirs. |
mkdir_p is aliased as: mkpath, makedirs. |
||
=={{header|Run BASIC}}== |
|||
<lang runbasic> |
|||
files #f, "c:\myDocs" ' check for directory |
|||
if #f hasanswer() then |
|||
if #f isDir() then ' is it a file or a directory |
|||
print "A directory exist" |
|||
else |
|||
print "A file exist" |
|||
end if |
|||
else |
|||
shell$("mkdir c:\myDocs" ' if not exist make a directory |
|||
end if</lang> |
|||
The following info about files / directory |
|||
FILE ACCESSOR methods |
|||
#handle HASANSWER() - Return non-zero if the file accessor has at least one |
|||
resulting row. |
|||
#handle ROWCOUNT() - Return the number of rows returned. |
|||
#handle NEXTFILE$() - Advance to the next row and return a comma delimited string for the next file (name, size, date, time, directory flag). |
|||
#handle NEXTFILE$([delimExpr$]) - Like NEXTFILE$() but you get to specify the delimiter instead of a comma. |
|||
#handle NAME$() - Return the name of the current file row. |
|||
#handle SIZE() - Return the size of the current file row. |
|||
#handle DATE$() - Return a string containing a formatted date for the current file row. |
|||
#handle TIME$() - Return a string containing a formatted time for the current file row. |
|||
#handle ISDIR() - Return non-zero if the current file row represents a directory instead of a file. |
|||
#handle RESET() - Reset the file accessor back to the beginning so you can read through them again. |
|||
#handle DATEFORMAT(template$) - Set the date format using a "mmm dd, yyyy" style template$. |
|||
#handle TIMEFORMAT(template$) - Set the time format using a "hh:mm:ss" style template$. |
|||
#handle ISNULL() - Returns zero (or false) |
|||
#handle DEBUG$() - Returns the string "Files" |
|||
=={{header|Scala}}== |
=={{header|Scala}}== |