Config2_Folder

Represents a folder in CompleteFTP's virtual file-system.

Instances of this class are obtained from Config2_FolderManager or from another Config2_Folder:

Properties

PropertyTypeDescription
access Config2_FolderAccess

Access control for non-Windows users to this folder.

createdTime Date

The date and time that this folder was created.

fullPath String

The absolute path of this folder in the virtual file-system.

hasSubfolders Boolean

Does this folder have any subfolders in the virtual file-system? Note that this does not indicate whether or not there are any subfolders or files in mapped folder in the underlying file-system.

hidden Boolean

If this property is set to true, then this folder will not show up in listings.

id String

The ID of this folder.

inbuilt Boolean

Is this an inbuilt folder that's created automatically during installation?

.
mapping Object

Mapping configuration object providing access to adapter-specific settings.

mappingPath String

Controls how the folder is mapped to the underlying file-system.

modifiedTime Date

The date and time that this folder was last modified.

name String

The name of this folder.

showRecursiveListing Boolean

Whether to show recursive listing.

type String

The type of this folder.

Methods

MethodReturnsDescription
add() Config2_Folder

Adds a subfolder of the given type to this folder.

getParent() Config2_Folder

Returns a Config2_Folder object representing the parent-folder of this folder.

list() Array.<Config2_Folder>

Returns an array of Config2_Folder objects representing all first-level subfolders of this folder.

remove() void

Deletes this folder.

Property Details

access :Config2_FolderAccess

Description:
  • Access control for non-Windows users to this folder. Permissions to Windows folders of non-Windows users and Windows users are handled separately. This setting only applies to non-Windows users. Permissions for Windows users are handled by Windows.

Access control for non-Windows users to this folder. Permissions to Windows folders of non-Windows users and Windows users are handled separately. This setting only applies to non-Windows users. Permissions for Windows users are handled by Windows.

Type:

(readonly) createdTime :Date

Description:
  • The date and time that this folder was created.

The date and time that this folder was created.

Type:
  • Date

(readonly) fullPath :String

Description:
  • The absolute path of this folder in the virtual file-system.

The absolute path of this folder in the virtual file-system.

Type:
  • String

(readonly) hasSubfolders :Boolean

Description:
  • Does this folder have any subfolders in the virtual file-system? Note that this does not indicate whether or not there are any subfolders or files in mapped folder in the underlying file-system.

Does this folder have any subfolders in the virtual file-system? Note that this does not indicate whether or not there are any subfolders or files in mapped folder in the underlying file-system.

Type:
  • Boolean

hidden :Boolean

Description:
  • If this property is set to true, then this folder will not show up in listings. This works independently of access permissions. For example, a folder may be shown but not accessible, or it may be hidden but still accessible.

If this property is set to true, then this folder will not show up in listings. This works independently of access permissions. For example, a folder may be shown but not accessible, or it may be hidden but still accessible.

Type:
  • Boolean

(readonly) id :String

Description:
  • The ID of this folder.

The ID of this folder.

Type:
  • String

(readonly) inbuilt :Boolean

Description:
  • Is this an inbuilt folder that's created automatically during installation?

Is this an inbuilt folder that's created automatically during installation?

Type:
  • Boolean

mapping :Object

Description:
  • Mapping configuration object providing access to adapter-specific settings.

Mapping configuration object providing access to adapter-specific settings.

Type:
  • Object

mappingPath :String

Description:
  • Controls how the folder is mapped to the underlying file-system. Notes:

    • This property always returns null for Virtual folders.
    • For Windows folders and Network/Macro folders, mappingPaths are Windows file-system paths. In addition, Network/Macro folders' mappingPaths may include macros or environment variables:
      • %UserName% - User-name (without domain).
      • %DomainName% - Domain name.
      • %HomeBaseFolder% - Windows path of Home folder (i.e. parent of users' home folders).
      • %ExternalHomeFolder% - [Database users only] Path read from user database.
    • For Windows special folders, valid values should be:
      • 'Home' (User's home folder)
      • 'Personal' (User's My Documents folders)
      • 'DesktopDirectory' (User's Desktop folder)
      • 'MyPictures' (User's Pictures folder)
      • 'MyMusic' (User's My Music folder)

Controls how the folder is mapped to the underlying file-system. Notes:

  • This property always returns null for Virtual folders.
  • For Windows folders and Network/Macro folders, mappingPaths are Windows file-system paths. In addition, Network/Macro folders' mappingPaths may include macros or environment variables:
    • %UserName% - User-name (without domain).
    • %DomainName% - Domain name.
    • %HomeBaseFolder% - Windows path of Home folder (i.e. parent of users' home folders).
    • %ExternalHomeFolder% - [Database users only] Path read from user database.
  • For Windows special folders, valid values should be:
    • 'Home' (User's home folder)
    • 'Personal' (User's My Documents folders)
    • 'DesktopDirectory' (User's Desktop folder)
    • 'MyPictures' (User's Pictures folder)
    • 'MyMusic' (User's My Music folder)
Type:
  • String

(readonly) modifiedTime :Date

Description:
  • The date and time that this folder was last modified.

The date and time that this folder was last modified.

Type:
  • Date

name :String

Description:
  • The name of this folder.

The name of this folder.

Type:
  • String

showRecursiveListing :Boolean

Description:
  • Whether to show recursive listing.

Whether to show recursive listing.

Type:
  • Boolean

(readonly) type :String

Description:
  • The type of this folder.

    • 'Virtual' - Folders of this type don't exist on the actual file system - they permit a virtual folder structure to be created.
    • 'Windows' - Standard Windows folders
    • 'WindowsSpecial' - Folders such as My Documents.
    • 'NetworkMacro' - Windows folders whose paths are specified by a URL into which various macros may optionally be substituted.
    • 'Gateway' - A gateway folder is a directory on a different server. It is basically a remotely mounted directory.

The type of this folder.

  • 'Virtual' - Folders of this type don't exist on the actual file system - they permit a virtual folder structure to be created.
  • 'Windows' - Standard Windows folders
  • 'WindowsSpecial' - Folders such as My Documents.
  • 'NetworkMacro' - Windows folders whose paths are specified by a URL into which various macros may optionally be substituted.
  • 'Gateway' - A gateway folder is a directory on a different server. It is basically a remotely mounted directory.
Type:
  • String

Method Details

add(name, type, mappingPath) → {Config2_Folder}

Description:
  • Adds a subfolder of the given type to this folder. Note that each subfolder of this folder must have a unique name. Subfolders of different folders may have the same name.

Parameters:
Name Type Description
name String

Name of the folder to be created.

type String

Type of the folder ('Virtual', 'Windows', 'WindowsSpecial', 'NetworkMacro').

mappingPath String

Controls how the folder is mapped to the underlying file-system.

Returns:

Created folder object

Type
Config2_Folder

getParent() → {Config2_Folder|null}

Description:
  • Returns a Config2_Folder object representing the parent-folder of this folder. Returns null if this folder is at the top level (i.e. root).

Returns:

Parent folder or null if root

Type
Config2_Folder | null

list() → {Array.<Config2_Folder>}

Description:
  • Returns an array of Config2_Folder objects representing all first-level subfolders of this folder.

Returns:

Array of child folders

Type
Array.<Config2_Folder>

remove(recursive)

Description:
  • Deletes this folder.

Parameters:
Name Type Description
recursive Boolean

If true, the folder will be deleted recursively.