File Information
Overview
The File Information operator is both a file and folder browser, as well as a file handling tool. It does not do anything with signal processing, and it does not have inputs or outputs. This is solely a service operator.Operator ports
This operator does not have inputs nor outputs. It cannot be connected to anything. You are free to place it anywhere on a design page.Properties
Find more information about changing properties here: "Properties Viewer"FileFilter
type: See descriptionA filter for files that should be displayed in the browser. By default this is '*.*'. An example of a filter is: '*.txt', to only show files with the .txt extension.
FilesFirst
type: True or FalseIf set to True, then files are listed first, and then folders. If false, the folders are listed first in the browser.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'
True or False
True may also be read like 'yes' and false like 'no'
FolderBrowser
type: True or FalseSet to True to show only folders in the Browser list, or False to also show files.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'
True or False
True may also be read like 'yes' and false like 'no'
Caption
type: Word or phraseThe name of the object in the project. This name must not contain '.', '$' nor '@' characters.
For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".
Documentation
type: See descriptionOptional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.
Variable Parameters
Find more information about Variable Parameters here: "Variable Parameters"FileName
type: See descriptionThe current file or folder name as selected in the Browser, as complete path. If a non-existing file or folder is specified, the browser resets to its root.
Name
type: See description [this value cannot be changed]Name (without extension) of the file that is selected in the browser.
Extension
type: See description [this value cannot be changed]Extension of the file that is selected in the browser.
Folder
type: See description [this value cannot be changed]Folder in which the file that is selected in the browser resides.
FileFilter
type: See descriptionA filter for files that should be displayed in the browser. By default this is '*.*'. An example of a filter is: '*.txt', to only show files with the .txt extension.
DiskVolumes
type: Parameter list (see "Parameter List")List of logical drive volumes on your computer
In this list, the value of each item contains the volume and the drive name. The Technical Name of each item is the volume label, like 'C:'.
Browser
type: Parameter list (see "Parameter List")File browser list. Display this list in a List Viewer. By clicking, files can be specified.
PathExists
type: See description [this value cannot be changed]Flags 1 if the function CheckPath specifies a path that exists, or 0 otherwise
FilteredFiles
type: Parameter list (see "Parameter List")List with file paths that is the result of the FindFiles function
UserIsAdministrator
type: See description [this value cannot be changed]Pseudo-boolean indicating if the current user has administrative rights in the operating system. 0 Means: no administrator.
This value will be '1' if Polybench was started with 'Run as administrator'. In that case, more operating system features are accessible, for example writing to system folders.
Read more about pseudo-booleans here: "Pseudo-booleans and triggers".
Read more about pseudo-booleans here: "Pseudo-booleans and triggers".
LastError
type: See description [this value cannot be changed]If any of the function calls causes an error, then the error is reported in this variable as a number.
These are error codes that may appear after a Function is called:
*) Note that if a parameter contains $-signs (dollar signs), then Polybench assumes a variable parameter, which it attempts to resolve.
Code | Description
-------------------------------------------------------
0 | No error (default)
1 | Parameter variables cannot be not resolved (*)
2 | No file path specified
3 | Unknown file path or name
4 | Source file does not exist
5 | Destination folder does not exist
6 | No destination file name specified
7 | No source file specified
8 | The specified path or file name exceeds
| the system-defined maximum length
9 | No wildcards ('*') are allowed
10 | File already exists
11 | No valid log-in data for impersonation
12 | The caller does not have the required permission
13 | A file name is written in an invalid format
14 | Unknown or unspecified problem
*) Note that if a parameter contains $-signs (dollar signs), then Polybench assumes a variable parameter, which it attempts to resolve.
LastLogonError
type: See description [this value cannot be changed]If a function shortly logs onto another domain, then feedback about the log-on process is reported in this variable as a number.
If a function in this operator uses impersonation, i.e. the app logs onto another domain using a specified user name and password in order to to get access to the file system of that domain, then any problems that may occur in the log-on process are reported here.
The log-on status is reported as a code. This is either an internal code as described below, or a system code that is reported by the operating system. System codes are marked as such and may use a different code scheme. For example, on a Windows operating system Win32 errors may occur. Those will be reported as Win32 0xXXXXXXXX (where 0xXXXXXXXX is a hexa-decimal number that you can look up on the Internet when you search for 'Win32 error codes'.
These are the internal status codes this variable may show:
*1) If a parameter contains $-signs (dollar signs), then Polybench assumes a variable parameter, which it attempts to resolve. Note that sometimes domain names contain a $-sign. This should be written as '$$' to have it resolved to '$'.
*2) Note that a user name is expected, not an account name
The log-on status is reported as a code. This is either an internal code as described below, or a system code that is reported by the operating system. System codes are marked as such and may use a different code scheme. For example, on a Windows operating system Win32 errors may occur. Those will be reported as Win32 0xXXXXXXXX (where 0xXXXXXXXX is a hexa-decimal number that you can look up on the Internet when you search for 'Win32 error codes'.
These are the internal status codes this variable may show:
Code | Description
-------------------------------------------------------
* * *| Waiting for the log-on to complete
0 | Successfully logged on (no error, default)
1 | Parameter variables cannot be not resolved (*1)
2 | No password specified (password field is empty)
3 | No user name specified (user name field is empty)
4 | No domain name specified (domain name field is empty)
5 | Domain cannot contain \\ or @ characters
6 | Username cannot contain \\ or @ characters (separate domain).
7 | Server cannot be reached
8 | Unknown user name (*2)
9 | Password not accepted
14 | Cannot log in. Unknown or unspecified problem
15 | No log-on was attempted (probably no credentials specified)
*1) If a parameter contains $-signs (dollar signs), then Polybench assumes a variable parameter, which it attempts to resolve. Note that sometimes domain names contain a $-sign. This should be written as '$$' to have it resolved to '$'.
*2) Note that a user name is expected, not an account name
Functions
Find more information about Functions here: "Operator Functions"CheckPath
Tests if the path refers to an existing file or folder and reads some basic information about the path. See also the PathExists variable.Parameter:
Path to a file or a folder on a local disk. May contain variables.
Path to a file or a folder on a local disk. May contain variables.
Delete
Deletes the file of folder that is specifiedParameter:
Path to a file or a folder on a local disk. May contain variables.
Path to a file or a folder on a local disk. May contain variables.
FindFiles
Find all files with the specified wildcardParameter:
Path containing wildcards, for example '$doc$*.poly5' to find all Poly5 files in the Documents folder. May contain variables.
Path containing wildcards, for example '$doc$*.poly5' to find all Poly5 files in the Documents folder. May contain variables.
MoveFile
Move one file to another folder. The destination folder must exist before the file is moved.Parameter:
[current path of the file] > [destination folder or new file name] - so, use the greater than symbol '>' to indicate where the file should be moved to. May contain variables. Optionally another '>' may be appended, followed by credentials to log-onto another domain on the network. The credentials are written like: [domain or machine name],[user name],[password]
[current path of the file] > [destination folder or new file name] - so, use the greater than symbol '>' to indicate where the file should be moved to. May contain variables. Optionally another '>' may be appended, followed by credentials to log-onto another domain on the network. The credentials are written like: [domain or machine name],[user name],[password]
TryLogOn
Tries to log onto another domain using the credentials as specified. The result of the test is shown in the variable LastLogonErrorParameter:
Log-on credentials written like: [domain or machine name],[user name],[password] (so: three items separated by commas). You may use variables.
Log-on credentials written like: [domain or machine name],[user name],[password] (so: three items separated by commas). You may use variables.
Details
How to make a file and folder browser
Take a List Viewer ("List Viewer") and set its Address property to the variable parameter Browser.When the user clicks a file or folder in the browser (in the List Viewer), then information about that file or folder is available in a number of other variable parameters of the File Information.
Hints
Please note that Polybench has a number of global variables that refer to standard folder paths.For example: $doc$ for Documents, $applicationfolder$ for the folder the current Polybench project file is located, etc. Please see "Free Global and Namespace Variables".