# TdApi.CleanFileName (tdlight API 4.0.311 API)
declaration: module: tdlight.api, package: it.tdlight.jni, class: TdApi, class: CleanFileName

Module tdlight.api
Package it.tdlight.jni

# Class TdApi.CleanFileName

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.Text>
it.tdlight.jni.TdApi.CleanFileName

Enclosing class:
  TdApi

public static final class TdApi.CleanFileName extends TdApi.Function<TdApi.Text>
Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously. Returns `Text`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONSTRUCTOR`
`String`
`fileName`
File name or path to the file.

## Constructor Summary

Constructors
Constructor
Description
`CleanFileName()`
Removes potentially dangerous characters from the name of a file.
`CleanFileName(DataInput input)`
Removes potentially dangerous characters from the name of a file.
`CleanFileName(String fileName)`
Removes potentially dangerous characters from the name of a file.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`

### Methods inherited from class it.tdlight.jni.TdApi.Function

`toString`

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### fileName

public String fileName
File name or path to the file.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### CleanFileName

public CleanFileName()
Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously. Returns `Text`

### CleanFileName

public CleanFileName(String fileName)
Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously. Returns `Text`

Parameters:
  `fileName` - String File name or path to the file.

### CleanFileName

public CleanFileName(DataInput input) throws IOException
Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously. Returns `Text`

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`