# FileSystem class
{: .no_toc }

A handle into the IDE's virtual file system --- the abstraction that lets an addin traverse and read source files without touching the on-disk paths. The **FileSystem** is reached through [**Host.FileSystem**](/tB/Packages/tbIDE/Host.md#filesystem). For the more common per-project case, [**Host.CurrentProject.RootFolder**](/tB/Packages/tbIDE/Project.md#rootfolder) is also a [**Folder**](/tB/Packages/tbIDE/Folder.md) and is usually the right entry point --- the global **FileSystem** matters when an addin needs to address files outside the project's own root.

```tb check_build
Dim item As FileSystemItem = Host.FileSystem.ResolvePath("twinbasic:/Sources/MainModule.twin")
```

## Properties

### RootFolder
{: .no_toc }

The root of the virtual file system. **As** [**Folder**](/tB/Packages/tbIDE/Folder.md). Read-only.

## Methods

### ResolvePath
{: .no_toc }

Looks up the [**FileSystemItem**](/tB/Packages/tbIDE/FileSystemItem.md) at a given path. The path uses the IDE's `twinbasic:/` URI scheme --- the same scheme that [**FileSystemItem.Path**](/tB/Packages/tbIDE/FileSystemItem.md#path) and [**Editor.Path**](/tB/Packages/tbIDE/Editor.md#path) return.

Syntax: *fileSystem*.**ResolvePath**( *Path* ) **As** [**FileSystemItem**](/tB/Packages/tbIDE/FileSystemItem.md)

*Path*
: *required* A virtual-FS path. **String**. Must include the `twinbasic:/` prefix.

The returned object is a [**FileSystemItem**](/tB/Packages/tbIDE/FileSystemItem.md) but is usually castable to its specific kind --- a [**File**](/tB/Packages/tbIDE/File.md) for regular files, a [**Folder**](/tB/Packages/tbIDE/Folder.md) for folders. Test with `TypeOf … Is Folder` before casting when the path's kind is not known statically.
