You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When invoking .create(), the boolean return false if the folder already exists.
Therefore, example 2 is incorrect and should be re-written to ensure the status of function .exists before the "Impossible" alert gets called.
Proposed Change
$newFolder:=Folder("/PACKAGE/Archives2019/January")
$wasCreated:=$newFolder.create()
Case of
: ($wasCreated)
ALERT("The "+$newFolder.name+" folder was created.")
: ($newFolder.exists)
ALERT("The "+$newFolder.name+" folder was previously created.")
Else ALERT("Impossible to create a "+$newFolder.name+" folder.")
End case
Existing Example Code
$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
When invoking .create(), the boolean return false if the folder already exists.
Therefore, example 2 is incorrect and should be re-written to ensure the status of function .exists before the "Impossible" alert gets called.
Proposed Change
Existing Example Code
https://github.com/4d/docs/blob/main/docs/API/FolderClass.md#create
The text was updated successfully, but these errors were encountered: