Tuesday October 29, 2024

       
      SteelArrow Basics
      SteelArrow Tags
  SteelArrow Functions
  SteelArrow Objects
  Advanced Topics
  WAS Overview
   
   
       
      Overview
  Code Samples
  Site Search
   
   
   


Get SteelArrow!     
  <SAFILE/>    
 
 
Secure Tag
Return to Tag List
 
The FILE tag offers a developer access to the file system. It allows such operations as DELETE, COPY, RENAME, MOVE, LIST directory, CREATE DIRectory, and UPLOAD. All operations operate on absolute paths.

For a secure version of file access use WRITEFILE which only allows relative paths, and not '..' (parent directory) access.

 
Attributes:
NAMEvariable (return value TRUE=success FALSE=failure;
or a directory list for ACTION="LIST")
ACTIONDELETE,COPY,RENAME,MOVE,LIST,SIZE,CREATEDIR,or UPLOAD
FILEsource of operation
SOURCEsame as FILE
DESTdestination of operation
DESTINATIONsame as DEST
FILEDATAvariable from an upload FORM (used with ACTION="UPLOAD")

 
The following are examples of FILE;
 
<SAFILE SOURCE="C:\test\filename.data"
  DEST="E:\test\copiedData.data" ACTION="COPY">

<SAFILE SOURCE="C:\test\filename.data"
  DEST="E:\test\movedData.data" ACTION="MOVE">

<!--- ACTION="DELETE" will delete files or empty directories --->
<SAFILE SOURCE="C:\test\filename.data" ACTION="DELETE">

<SAFILE SOURCE="C:\test\aDirectory" ACTION="CREATEDIR">

<SAFILE SOURCE="C:\test\" ACTION="LIST" NAME=dirList>

<SAFILE SOURCE="C:\test\" ACTION="SIZE" NAME=dirSize>

<SAFILE FILEDATA=PARAM.uploadData
  ACTION="UPLOAD" DEST="C:\test\uploads\">





Copyright © 1998-2004 Tomahawk Technologies Inc.
Privacy Policy