file.sureFilePath

Syntax file.sureFilePath (path)

Params path is a legal path name to a file or folder whose path components you want to ensure the existence of.

Action Makes sure that all folders in the specified path exist.

Returns The number of path components

Examples file.new ("C:\\This\\is\\a\\really\\long\\path.html")

   » generates an error, because the folder doesn't exist

file.sureFilePath ("C:\\This\\is\\a\\really\\long\\path.html")

   » 6

file.new ("C:\\This\\is\\a\\really\\long\\path.html")

   » true // now it's safe to create files in that folder

Notes Use this when you want to add something to a folder. It saves you from dealing with the errors that arise when you try to put a document into a non-existent folder.

See Also file.sureFolder

file.isFolder

file.newFolder

Discuss