Class File
- Namespace
- GtkSource
- Assembly
- GtkSource-5.dll
public class File : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
File
- Implements
- Inherited Members
Constructors
File(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public File(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
File(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected File(CreationData data)
Parameters
dataCreationData
File(FileHandle)
protected File(FileHandle handle)
Parameters
handleFileHandle
Fields
CompressionTypePropertyDefinition
public static readonly Property<CompressionType, File> CompressionTypePropertyDefinition
Field Value
EncodingPropertyDefinition
public static readonly Property<Encoding, File> EncodingPropertyDefinition
Field Value
LocationPropertyDefinition
public static readonly Property<File, File> LocationPropertyDefinition
Field Value
NewlineTypePropertyDefinition
public static readonly Property<NewlineType, File> NewlineTypePropertyDefinition
Field Value
ReadOnlyPropertyDefinition
public static readonly Property<bool, File> ReadOnlyPropertyDefinition
Field Value
Properties
CompressionType
public CompressionType CompressionType { get; }
Property Value
Encoding
public Encoding Encoding { get; }
Property Value
Location
public File Location { get; set; }
Property Value
NewlineType
public NewlineType NewlineType { get; }
Property Value
ReadOnly
public bool ReadOnly { get; }
Property Value
Methods
CheckFileOnDisk()
public void CheckFileOnDisk()
GetCompressionType()
public CompressionType GetCompressionType()
Returns
GetEncoding()
public Encoding GetEncoding()
Returns
GetGType()
public static Type GetGType()
Returns
GetLocation()
public File GetLocation()
Returns
GetNewlineType()
public NewlineType GetNewlineType()
Returns
IsDeleted()
public bool IsDeleted()
Returns
IsExternallyModified()
public bool IsExternallyModified()
Returns
IsLocal()
public bool IsLocal()
Returns
IsReadonly()
public bool IsReadonly()
Returns
New()
public static File New()
Returns
NewFromPointer(nint, bool)
Creates a new managed File instance for a given pointer.
public static File NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new File and sets the properties specified by the construct arguments.
public static File NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
SetLocation(File?)
public void SetLocation(File? location)
Parameters
locationFile
SetMountOperationFactory(MountOperationFactory)
public void SetMountOperationFactory(MountOperationFactory callback)
Parameters
callbackMountOperationFactory