Documentation

xPCDirectoryInfo Class

Access folders and subfolders of target computer file system

Syntax

public class xPCDirectoryInfo : xPCFileSystemInfo

Description

Namespace: MathWorks.xPCTarget.FrameWork

Syntax Language: C#

public class xPCDirectoryInfo : xPCFileSystemInfo accesses folders and subfolders of target computer file system.

A fully qualified folder name can have a maximum of 248 characters, including the drive letter, colon, and backslash.

Constructor

ConstructorDescription
xPCDirectoryInfoConstruct new instance of the xPCDirectoryInfo class on specified path

Methods

MethodDescription
xPCDirectoryInfo.CreateCreate folder
xPCDirectoryInfo.DeleteDelete empty xPCDirectoryInfo object
xPCDirectoryInfo.GetDirectoriesSubfolders of current folder
xPCDirectoryInfo.GetFilesFile list from current folder
xPCDirectoryInfo.GetFileSystemInfosFile system information for files and subfolders in folder

Properties

PropertyC# Declaration SyntaxDescriptionException

CreationTime

public override DateTime CreationTime {get;}

Get creation time of the current FileSystemInfo object.

xPCException — When problem occurs, query xPCException object Reason property.

Exists

public override bool Exists {get;}

Get a Boolean value that indicates the existence of the folder. A value of 1 indicates that the folder exists, 0 indicates that it does not.

xPCException — When problem occurs, query xPCException object Reason property.

Extension

public string Extension {get;}

Get character string that represents the extension part of the file.

 

FullName

public virtual string FullName {get;}

Get full path name of the folder or file.

 

Name

public override string Name {get;}

Get the name of this xPCDirectoryInfo instance as a character string.

xPCException — When problem occurs, query xPCException object Reason property.

Parent

public xPCDirectoryInfo Parent {get;}

Get the parent folder of a specified subfolder.

xPCException — When problem occurs, query xPCException object Reason property.

Root

public xPCDirectoryInfo Root {get;}

Get the root portion of a path.

xPCException — When problem occurs, query xPCException object Reason property.

Introduced in R2011b

Was this topic helpful?