> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class FileUtility

Namespace: [OpenTD.Utility](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Utility)\
Assembly: OpenTD.dll

Utility methods for working with files.

```csharp theme={null}
public static class FileUtility
```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[FileUtility](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Utility.FileUtility.md)

## Inherited Members

[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Methods

### GetEndOfPath(string)

Returns either the filename or directory name at the end of the input path.

```csharp theme={null}
public static string GetEndOfPath(string path)
```

#### Parameters

`path` [string](https://learn.microsoft.com/dotnet/api/system.string)

The path.

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

System.String.

### IsDirectory(string)

Determines whether the specified path is a directory.

```csharp theme={null}
public static bool IsDirectory(string path)
```

#### Parameters

`path` [string](https://learn.microsoft.com/dotnet/api/system.string)

The path.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

`true` if the specified path is a directory; otherwise, `false`.

### IsFileLocked(FileInfo)

Determines whether a file is locked for use.

```csharp theme={null}
public static bool IsFileLocked(FileInfo file)
```

#### Parameters

`file` [FileInfo](https://learn.microsoft.com/dotnet/api/system.io.fileinfo)

The file.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)
