Salesforce

FileInfo (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

FileInfo (Magic xpa 3.x)

Returns the file properties.

Syntax:

FileInfo (name, info type)

Parameters:

name: A file (with or without a path) or a directory.

If no path or a relative path is specified, it will be relative to the project folder.

info type: The file information will be according to the following table:

Info Type Value

Description

1

File name (without path)

2

Location (file path)

3

Full path (Location + File name)

4

Attributes – comma-delimited string that contains the following attributes (additional info exists at msdn):

  • ARCHIVE

  • COMPRESSED

  • DIRECTORY

  • ENCRYPTED

  • HIDDEN

  • READONLY

  • SYSTEM

Note: These strings will be in English even when using the mgconsts of other languages.

5

Size in bytes (without thousand separator)

6

Created date

7

Created time

8

Modified date

9

Modified time

10

Accessed date

11

Accessed time

Returns:

The file properties.

The function will return the appropriate information according to the Info Type.

In case of an error (file does not exist), the function will return Null.

Note:

If the path ends with a backslash (\), the function may return blank. It is recommended not to include the backslash at the end of the path.

Platform specific:

For the UNIX operating system, the Created and Accessed date and time will be equal to the Modified date and time.

See also:

ClientFileInfo

How Do I Get the Size of a File on Disk?

How Do I Get the Creation Date of a File on Disk?

The Online and Rich Client Samples projects (program EL15, EL16, EL17, EL20, EL21 REL15, REL16, REL17, REL20 and REL21)

Since version:

1.5

Reference
Attachment 
Attachment