View Single Post
Old 03-04-2012, 01:59 PM   #81
Pidgeoni

Pidgeoni's Avatar
 
Join Date: Jul 2009
Posts: 1,734
Thanks: 185
Thanked 317 Times in 190 Posts
Default

Had that too rancho, a clean install of archlinux fixed it for me :|


Here's how to check if a file exists for a client

The "FileExists" function is server only, as stupid as that is.
For the "ForEachFile" sintax, just type the command in console.
The "file_exists" variable is a custom one, but there are other "file_*" variables that are used by the "ForEachFile" command if you are interested in having a look.

HTML Code:
Set file_exists false
ForEachFile * /path/to/file filename true "Set file_exists true"
UI equivalent:

HTML Code:
Set('file_exists',0);
ForEachFile('*','/path/to/file','filename',true,Set('file_exists',1));
You can also GetCheckSum but it prints an error if file is not found.

Last edited by Pidgeoni; 03-07-2012 at 03:44 PM.
Pidgeoni is offline   Reply With Quote