JCL Help:ForceDirectories

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Creates all the directories along a directory path if they do not already exist.


Pascal

 function ForceDirectories(Name: string): Boolean;


Parameters

Parameters Description
Name: string Directory path to be created, if it doesn't exist already.


Return Value

ForceDirectories returns True if it successfully creates all necessary directories, False if it could not create a needed directory.


Description

Creates all the directories along a directory path if they do not already exist. Note that this routine was copied from FileCtrl.pas to avoid a dependency on that unit, see source code further more details.


About

Unit

JclFileUtils


Donator

Marcel van Brakel


Notes

Do not call ForceDirectories with an empty string. Doing so causes ForceDirectories to raise an exception.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page