Biferno 1.7 Tabasoft.it

Application: ItaliaScuola Back-Office3
Reference
Admin | Edit | Reference | Cache | Logs
Click on a class name to see the description of that particular class:

Predefined Classes

ansi
array
biferno
boolean
cacheItem
char
classInfo
client
collection
curApp
curFile
curScript
db
double
error
file
folder
header
httpPage
imageUtils
int
long
memberInfo
multipart
object
ref
regexp
request
search
serverInfo
smtp
stackItem
string
time
unix
unsigned
 

Application Classes

Banner
BrowserBar
Ctrl_Form
FCKeditor
Form
GridChartGraph
Histogram
LocalDate
Result
condb
cookie
folderExt
headerExt
httpExt
mysqlFulltext
objHtml
requestExt
tableExport
utils
 

Functions

Functions

folder

Method:

Walk

int Walk(string suffix, boolean recursive, string callBack, obj *userdata)

Description:

Using the Walk static method of the folder class a directory can be examined and operations can be executed automatically on every file contained in the directory, without previous knowledge of the number, nature and names of the files.

Parameters:
suffix

Denotes the type, i.e. the extension of the files we want to examine. Passing the ".txt" string will filter only text files, while the ".*" string will result in no filtering, i.e. all file types will be examined.

Notice that passing an empty string in the suffix parameter will result in filtering only files with no extension

recursive

Specifies if we want to explore all subdirectories of the target directory.

callBack

The name of a function we want to execute on each file found in the target directory.

The callBack function must have the following prototype:

function int function_name (
		string filePath, 
		int variant, 
		obj *userData)

or can be a static method of prototype:

static int method_name (
		string filePath, 
		int variant, 
		obj *userData)

userdata

The userData optional parameter can be an object of any class and can be only passed by reference. This parameter will be passed to the callback function.

Returns:

The method returns an integer value that contains an error code generated by the callback function. If there have been no errors during execution, the function must return the value 0 (zero).

Notes:

The variant parameter in the callBack function is used to determin the file type (see the 'file' class).

For example:

if (variant & file.isFolderBit)
print("Is a folder");

See also:

file.isFolderBit, file.isAliasBit

Implementation:
C
 

Return to the folder class