# GetResourceForLocalPath

> **Extension method**
:::note
In C#, you can call this method as an instance method on any object of type [ISystemService](https://docs.uipath.com/ms-its:C:/CodedDocs/Help/Documentation.chm::/html/96c9347f-5209-3d15-4078-195abb2ae145.htm). When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](https://docs.microsoft.com/dotnet/visual-basic/programming-guide/language-features/procedures/extension-methods) or [Extension Methods (C# Programming Guide)](https://docs.microsoft.com/dotnet/csharp/programming-guide/classes-and-structs/extension-methods).
:::

**Extension method**
:::note
In C#, you can call this method as an instance method on any object of type [ISystemService](https://docs.uipath.com/ms-its:C:/CodedDocs/Help/Documentation.chm::/html/96c9347f-5209-3d15-4078-195abb2ae145.htm). When you use instance method syntax to call this method, omit the first parameter. For more information, see [Extension Methods (Visual Basic)](https://docs.microsoft.com/dotnet/visual-basic/programming-guide/language-features/procedures/extension-methods) or [Extension Methods (C# Programming Guide)](https://docs.microsoft.com/dotnet/csharp/programming-guide/classes-and-structs/extension-methods).
:::

Build a resource from the local path of the file or folder.

## Definition

**Namespace:** UiPath.Activities.System.API

**Assembly:** UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

## `GetResourceForLocalPath`

```
public static IResource GetResourceForLocalPath(
    this ISystemService system,
    string path,
    PathType pathType
)
```

`system` [ISystemService](https://docs.uipath.com/ms-its:C:/CodedDocs/Help/Documentation.chm::/html/96c9347f-5209-3d15-4078-195abb2ae145.htm)

`path` [String](https://learn.microsoft.com/dotnet/api/system.string) : The local path of the file or folder.

`pathType` `PathType` : The type of the resource.

## Return value

`IResource`

Returns an IResource object for a local path.
