Difference between revisions of "Working with Files and File Systems in Recital"

From Recital Documentation Wiki
Jump to: navigation, search
(Miscellaneous File and File System Commands and Functions)
(Accessing File Attributes in Recital)
Line 29: Line 29:
  
 
===Accessing File Attributes in Recital===
 
===Accessing File Attributes in Recital===
* [[FILEINFO()|fileinfo()]]
+
* [[FILEINFO()|fileinfo()]] - return a comma-separated string containing information about a file
  
* [[FSIZE()|fsize()]]
+
<pre>
 +
character = fileinfo(<filename as character>)
 +
</pre>
  
* [[FDATE()|fdate()]]
+
* [[FSIZE()|fsize()]] - return the size of a file
  
* [[FTIME()|ftime()]]
+
<pre>
 +
numeric = fsize(<filename as character>)
 +
</pre>
  
* [[FULLPATH()|fullpath()]]
+
* [[FDATE()|fdate()]] - return the last modification date of a file
  
* [[BASENAME()|basename()]]
+
<pre>
 +
date = fdate(<filename as character>)
 +
</pre>
 +
 
 +
* [[FTIME()|ftime()]] - return the last modification time of a file
 +
 
 +
<pre>
 +
character = ftime(<filename as character>)
 +
</pre>
 +
 
 +
* [[FULLPATH()|fullpath()]] - return the full path of a file
 +
 
 +
<pre>
 +
character = fullpath(<filename as character>)
 +
</pre>
 +
 
 +
 
 +
* [[BASENAME()|basename()]] - return the base filename of a file
 +
 
 +
<pre>
 +
character = basename(<filename as character>)
 +
</pre>
  
 
===Miscellaneous File and File System Commands and Functions===
 
===Miscellaneous File and File System Commands and Functions===

Revision as of 11:28, 25 January 2010

Working with Files and File Systems in Recital

Opening and Creating Text Files in Recital

Closing Text Files in Recital

Writing to a Text File using Recital

Reading From a Text File using Recital

Checking Whether a File Exists in Recital

Moving, Copying and Deleting Files with Recital

Accessing File Attributes in Recital

  • fileinfo() - return a comma-separated string containing information about a file
character = fileinfo(<filename as character>)
  • fsize() - return the size of a file
numeric = fsize(<filename as character>)
  • fdate() - return the last modification date of a file
date = fdate(<filename as character>)
  • ftime() - return the last modification time of a file
character = ftime(<filename as character>)
character = fullpath(<filename as character>)


character = basename(<filename as character>)

Miscellaneous File and File System Commands and Functions

  • adir() - return number of files matching a pattern and load filenmames and information into arrays
numeric = adir(<skeleton as character> [, <filenames as array> [, <filesizes as array> 
[, <creationdates as array> [, <creationtimes as array> [, <attributes as array>]]]]])
 
  • dir - display a directory of files
dir [<skeleton as character>]
  • filecount()- return number of files matching a pattern
numeric = filecount(<skeleton as character>)
  • curdir() - return name of the current directory
character = curdir()
  • default()- return name of the current directory
character = default()
set default to [<directory as character>]
  • path() - return current Recital path setting
character = path()
set path to [<directories as character>]
  • diskspace() - return the available space on the current disk
numeric = diskspace()