This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
folder.create( )
|
folder.create () -> Result | ||||||||
Parameter | Type | Description | ||||||
Result | Boolean |
![]() |
True if the folder was created successfully, false otherwise | |||||
The folder.create( ) method creates a folder on disk according to the properties of the Folder object.
If necessary, the function creates the folder hierachy as described in the folder.path or folder.platformPath property. If the folder already exists on disk, the function does nothing (no error is thrown) and returns false.
Returned value
Create an empty folder in the database folder:
C_OBJECT($prefs)
C_BOOLEAN($created)
$created:=Folder("/PACKAGE/SpecialPrefs").create()
Creation of the "/Archives2019/January/" folder in the database folder:
$newFolder:=Folder("/PACKAGE/Archives2019/January")
If($newFolder.create())
ALERT("The "+$newFolder.name+" folder was created.")
Else
ALERT("Impossible to create a "+$newFolder.name+" folder.")
End if
Product: 4D
Theme: File and Folder
Created: 4D v17 R5
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)