Search these areas:
Help
Support Forums
Product Info



Introduction
DataWeb: What's New
Creating an Application
The DataWeb Designer
Application Management
Data Tables
Data Tables
Views
Templates
Components
Data Analysis
Members
Security
Importing
Exporting
FTP
JavaScript
Object Model
JavaScript Objects
General Scripting Objects
Data Access Objects
File Access Objects
-File Object
-Files Collection
-Folder Object
copy
create
createNew
exists
getDateCreated
getExisting
getParentPath
getRole
isDataFolder
isRootFolder
isSecurityInherited
move
remove
rename
setRole
setSecurityInherited
-Folders Collection
Http Client Objects
Security and Membership Objects
Document Object Model (DOM)
Error Descriptions
Object Model Extensions
Full-Text Search
Domain and Email Hosting
HotBlock Modules
Account Management
Glossary
New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

DataWeb User's Guide

Folder Object
The Folder object represents a folder in a DataWeb Web. By using the folder object and its associated methods you can create and delete folders within your Web, as well as arrange and modify the data within the folders of your Web. (Note that only users with Designer permissions or higher can run scripts which call methods on the File and Folder objects.)

Constructor

[new] Folder(path) Constructs and returns a new Folder object instance. It does not create a folder on the file system.

Instance Properties

name Holds the name of the folder. The name property does not include a leading or trailing slash.
path Holds the path of the folder. The path property includes both leading and trailing slashes.

Instance Methods

copy Copies a specified folder from one location to another.
exists Checks to see if a specified folder exists in file system hierarchy.
getDateCreated Returns a Date object containing the date/time when the folder was created.
getParentPath Returns the path of a specified folder's parent folder.
getRole Returns the role for a specified folder.
isDataFolder Checks to see if a specified folder is a data folder.
isRootFolder Checks to see if a specified folder is the root folder of a Web.
isSecurityInherited Checks to see if a specified folder has inherited it's security settings from a parent folder.
move Moves a specified folder from one location to another.
remove Removes a specified folder from the file system.
rename Resets a specified folder's name and path to new values.
setRole Set a FolderRole for a group.
setSecurityInherited Causes a specified folder to inherit or not to inherit the security settings of its parent folder.

Prototype Methods

create Creates a folder in the file system hierarchy as well as a corresponding Folder object instance.
createNew Creates a folder in the file system hierarchy as well as a corresponding Folder object instance.
exists Checks to see if a specified folder exists in the file system hierarchy.
getExisting A Folder object instance is created and returned if a specified folder exists.
remove Removes a specified folder from the file system hierarchy


Examples

  var fol = new Folder("/someFolder/");
The following example, then placed within a .view file, outputs a list of links to the files within the root directory.
var fold = new Folder("/");
var arr = fold.files.getObjects();
for(var i = 0; i<arr.length; i++)
    response.write("<a href='http://" 
    +  web.name + "." + web.domain 
    + "/" + arr[i].name 
    + "?_admin=source'>" + arr[i].name + "</a><br>");
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
Email Us