XactCommerce Xact Objects
Home
News
XactCommerce
Typical Applications
Custom Development
Private Backend
XactScript Language
Performance
Deployment
Partners
Portfolio
About Us
leXml Language < Interface Modules & Commands < If_FileManager

If_FileManager
This interface module allows file manipulation server-side

getpagedir
This command returns your current local directory on the server as an absolute path name.


getglobaltempdir
This command returns the absolute path of the global temp directory


getlocaltempdir
This returns the absolute path to the local/system temp directory


mkdir
This command creates a directory as a subdirectory of the directory given. Obviously the task that LeXml is running under must have permission to do this. Returns absolute path of new dir or 'error: ...'.
 
Arguments:
cwd=directory to put the new directory in
name=name of new directory (as subdirectory of cwd)


makepathname
This returns the name of a file in a given subdirectory (used for OS independance since different OSs use different path separators)
 
Arguments:
cwd=directory where file would be
name=filename


dump
Reads and outputs a given file (provided you have access to it). Returns 'ok' or 'error'. Use 'assignoutput=...' in your _call tag to assign the contents of the file to a variable. (path=full path to file)


write
This writes the contents of a variable to a given filename.
 
Arguments:
path=full path to file to write to
data=data to write to file
 
Returns "error:..." or "ok".


exists
Returns 'yes' or 'no' based on whether or not a given path exists


delete
Deletes a file. Returns 'yes' or 'no' to whether a file was actually deleted.


move
Moves a file from path1 to path2. Returns 'yes' or 'error: ...'


writefromurl
This command goes out and fetches a URL and dumps it to a file. Returns 'ok' or 'error:...'.
 
Arguments:
path=path of file to write
url=url to access


filesize
Returns the file size or -1 if an error occurs (path=file path)


namefromfullpath
Returns only the file name portion of a path (path=path)


saveproperties
This saves a properties file containing a series of variables. All body options except 'path=...' are considered variables to be saved.


loadproperties
This loads a properties list into page variables named after the properties in the list.


getpathseparator
This returns the path separator used on the current box