Xceed .NET Libraries Documentation
GetFile(FileSystemEvents,Object,String) Method


Xceed.FileSystem Assembly > Xceed.FileSystem Namespace > AbstractFolder Class > GetFile Method : GetFile(FileSystemEvents,Object,String) Method
A FileSystemEvents object that will be used to raise events. Cannot be a null reference (Nothing in Visual Basic).
Opaque data that will be passed back to the event handler when an event is raised.
Relative name of the file to retrieve.
Returns an AbstractFile object that represents a file contained in the folder and raises events during the process.
Syntax
'Declaration
 
Public Overloads Function GetFile( _
   ByVal events As FileSystemEvents, _
   ByVal userData As Object, _
   ByVal relativeName As String _
) As AbstractFile
'Usage
 
Dim instance As AbstractFolder
Dim events As FileSystemEvents
Dim userData As Object
Dim relativeName As String
Dim value As AbstractFile
 
value = instance.GetFile(events, userData, relativeName)
public AbstractFile GetFile( 
   FileSystemEvents events,
   object userData,
   string relativeName
)

Parameters

events
A FileSystemEvents object that will be used to raise events. Cannot be a null reference (Nothing in Visual Basic).
userData
Opaque data that will be passed back to the event handler when an event is raised.
relativeName
Relative name of the file to retrieve.

Return Value

An AbstractFile object representing the file named relativeName.
Remarks

The relativeName parameter can include relative path information, in which ".." means "previous folder". For example: "folder/file.txt", "../file.txt", etc.

This method allows to get a reference to an AbstractFile object for a file that exists, as well as for a file that does not exist. Further, the folder on which this method is called may not exist.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AbstractFolder Class
AbstractFolder Members
Overload List