FileSystem

Purpose:
Allow XSL transforms to query and manipulate files and directories. Also handles system path parsing and processing.
Namespace:
urn:WebWorks-XSLT-Extension-FileSystem
Prefix:
wwfilesystem
Methods:
Exists(string path):

Determine if a file or directory exists at the given path.

Returns:
Boolean.
Example:

Create directory C:\exists if it does not exist.

<xsl:if test="wwfilesystem:Exists('C:\\exists')">
 <xsl:variable name="VarCreateDirectory" select="wwfilesystem:CreateDirectory('C:\\exists')" />
</xsl:if>
DirectoryExists(string path):

Determine if a directory exists at the given path. If a file exists with the given path, this method will return false().

Returns:
Boolean.
Example:

Log existence of directory C:\direxists.

<xsl:if test="wwfilesystem:DirectoryExists('C:\\direxists')">
 <xsl:variable name="VarLog" select="wwlog:Message('Directory \'', 'C:\\direxists', '\' exists!')" />
</xsl:if>
FileExists(string path):

Determine if a file exists at the given path. If directory exists with the given path, this method will return false().

Returns:
Boolean.
Example:

Log existence of file C:\fileexists.

<xsl:if test="wwfilesystem:FileExists('C:\\fileexists')">
 <xsl:variable name="VarLog" select="wwlog:Message('Directory \'', 'C:\\fileexists', '\' exists!')" />
</xsl:if>
CreateDirectory(string path):

Creates a directory with the given path. If the directory already exists, the method will return false().

Returns:
Boolean.
Example:

Create directory C:\exists if it does not exist.

<xsl:if test="wwfilesystem:Exists('C:\\exists')">
 <xsl:variable name="VarCreateDirectory" select="wwfilesystem:CreateDirectory('C:\\exists')" />
</xsl:if>
DeleteDirectory(string path):

Delete the directory with the given path.

Returns:
Nothing.
Example:

Delete the directory C:\deleteme.

<xsl:variable name="VarDeleteDirectory" select="wwfilesystem:DeleteDirectory('C:\\deleteme')" />
DeleteFile(string path):

xx

Returns:
Nothing.
Example:
xx
GetFiles(string path):

xx

Returns:
xx
Example:
xx
GetRelativeFiles(string path):

xx

Returns:
xx
Example:
xx
CopyDirectoryFiles(string sourceDirectoryPath, string destinationDirectoryPath):

xx

Returns:
xx
Example:
xx
CopyFile(string sourcePath, string destinationPath):

xx

Returns:
xx
Example:
xx
FilesEqual(string alphaPath, string betaPath):

xx

Returns:
Boolean.
Example:
xx
AppendFileWithFile(string targetPath, string sourcePath):

Appends the contents of the file located at the sourcePath to the file located at the targetPath.

Returns:
Nothing.
Example:

Append the contents of "C:\FileSampleDoc.txt" to "C:\OutputAllContent.txt".

<xsl:variable name="VarADoc">C:\\File\Sample\Doc.txt</xsl:variable>
<xsl:variable name="VarAllDocs">C:\\Output\All\Content.txt</xsl:variable>
<xsl:variable name="ActionAppendingDocToAllContent" select="wwfilesystem:AppendFileWithFile($VarAllDocs, $VarADoc)" />
GetDirectoryName(string path):

xx

Returns:
xx
Example:
xx
GetFileName(string path):

xx

Returns:
xx
Example:
xx
GetExtension(string path):

xx

Returns:
xx
Example:
xx
GetFileNameWithoutExtension(string path):

xx

Returns:
xx
Example:
xx
GetWithExtensionReplaced(string path, string extension):

xx

Returns:
xx
Example:
xx
Combine(string path, string component1, string component2, string component3, string component4, string component5, string component6):

xx

Returns:
xx
Example:
xx
GetChecksum(string path):

xx

Returns:
xx
Example:
xx
ChecksumUpToDate(string path, string checksum):

xx

Returns:
xx
Example:
xx
GetRelativeTo(string path, string anchorPath):

xx

Returns:
xx
Example:
xx
TranslateFileToEncoding(string sourceFilePath, string sourceFileEncodingName, string destinationFilePath, string destinationFileEncodingName):

xx

Returns:
xx
Example:
xx

DevCenter/Documentation/ExtensionObjects/ePublisher/FileSystem (last edited 2019-02-20 00:45:10 by TonyMcDow)