Interface File
- Namespace
- Gio
- Assembly
- Gio-2.0.dll
public interface File : NativeObject, GTypeProvider, IDisposable
- Inherited Members
Methods
AppendTo(FileCreateFlags, Cancellable?)
FileOutputStream AppendTo(FileCreateFlags flags, Cancellable? cancellable)
Parameters
flagsFileCreateFlagscancellableCancellable
Returns
AppendToFinish(AsyncResult)
FileOutputStream AppendToFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
BuildAttributeListForCopy(FileCopyFlags, Cancellable?)
[Version("2.68")]
string BuildAttributeListForCopy(FileCopyFlags flags, Cancellable? cancellable)
Parameters
flagsFileCopyFlagscancellableCancellable
Returns
Copy(File, FileCopyFlags, Cancellable?, FileProgressCallback?)
bool Copy(File destination, FileCopyFlags flags, Cancellable? cancellable, FileProgressCallback? progressCallback)
Parameters
destinationFileflagsFileCopyFlagscancellableCancellableprogressCallbackFileProgressCallbackA callback. If it raises an exception the application will terminate. To receive this unhandled exception see SetHandler(Action<Exception>?).
Returns
CopyAsync(File, FileCopyFlags, int, Cancellable?, Closure?, Closure)
[Version("2.82")]
void CopyAsync(File destination, FileCopyFlags flags, int ioPriority, Cancellable? cancellable, Closure? progressCallbackClosure, Closure readyCallbackClosure)
Parameters
destinationFileflagsFileCopyFlagsioPriorityintcancellableCancellableprogressCallbackClosureClosurereadyCallbackClosureClosure
CopyAttributes(File, FileCopyFlags, Cancellable?)
bool CopyAttributes(File destination, FileCopyFlags flags, Cancellable? cancellable)
Parameters
destinationFileflagsFileCopyFlagscancellableCancellable
Returns
CopyFinish(AsyncResult)
bool CopyFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
Create(FileCreateFlags, Cancellable?)
FileOutputStream Create(FileCreateFlags flags, Cancellable? cancellable)
Parameters
flagsFileCreateFlagscancellableCancellable
Returns
CreateFinish(AsyncResult)
FileOutputStream CreateFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
CreateReadwrite(FileCreateFlags, Cancellable?)
[Version("2.22")]
FileIOStream CreateReadwrite(FileCreateFlags flags, Cancellable? cancellable)
Parameters
flagsFileCreateFlagscancellableCancellable
Returns
CreateReadwriteFinish(AsyncResult)
[Version("2.22")]
FileIOStream CreateReadwriteFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
Delete(Cancellable?)
bool Delete(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
DeleteFinish(AsyncResult)
[Version("2.34")]
bool DeleteFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
Dup()
File Dup()
Returns
EjectMountableFinish(AsyncResult)
bool EjectMountableFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
EjectMountableWithOperationFinish(AsyncResult)
[Version("2.22")]
bool EjectMountableWithOperationFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
EnumerateChildren(string, FileQueryInfoFlags, Cancellable?)
FileEnumerator EnumerateChildren(string attributes, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
attributesstringflagsFileQueryInfoFlagscancellableCancellable
Returns
EnumerateChildrenFinish(AsyncResult)
FileEnumerator EnumerateChildrenFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
Equal(File)
bool Equal(File file2)
Parameters
file2File
Returns
FindEnclosingMount(Cancellable?)
Mount FindEnclosingMount(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
FindEnclosingMountFinish(AsyncResult)
Mount FindEnclosingMountFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
GetBasename()
string? GetBasename()
Returns
GetChild(string)
File GetChild(string name)
Parameters
namestring
Returns
GetChildForDisplayName(string)
File GetChildForDisplayName(string displayName)
Parameters
displayNamestring
Returns
GetParent()
File? GetParent()
Returns
GetParseName()
string GetParseName()
Returns
GetPath()
string? GetPath()
Returns
GetRelativePath(File)
string? GetRelativePath(File descendant)
Parameters
descendantFile
Returns
GetUri()
string GetUri()
Returns
GetUriScheme()
string? GetUriScheme()
Returns
HasParent(File?)
[Version("2.24")]
bool HasParent(File? parent)
Parameters
parentFile
Returns
HasPrefix(File)
bool HasPrefix(File prefix)
Parameters
prefixFile
Returns
HasUriScheme(string)
bool HasUriScheme(string uriScheme)
Parameters
uriSchemestring
Returns
Hash()
uint Hash()
Returns
IsNative()
bool IsNative()
Returns
LoadBytes(Cancellable?, out string?)
[Version("2.56")]
Bytes LoadBytes(Cancellable? cancellable, out string? etagOut)
Parameters
cancellableCancellableetagOutstring
Returns
LoadBytesFinish(AsyncResult, out string?)
[Version("2.56")]
Bytes LoadBytesFinish(AsyncResult result, out string? etagOut)
Parameters
resultAsyncResultetagOutstring
Returns
MakeDirectory(Cancellable?)
bool MakeDirectory(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
MakeDirectoryFinish(AsyncResult)
[Version("2.38")]
bool MakeDirectoryFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
MakeDirectoryWithParents(Cancellable?)
[Version("2.18")]
bool MakeDirectoryWithParents(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
MakeSymbolicLink(string, Cancellable?)
bool MakeSymbolicLink(string symlinkValue, Cancellable? cancellable)
Parameters
symlinkValuestringcancellableCancellable
Returns
MakeSymbolicLinkFinish(AsyncResult)
[Version("2.74")]
bool MakeSymbolicLinkFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
MeasureDiskUsage(FileMeasureFlags, Cancellable?, FileMeasureProgressCallback?, out ulong, out ulong, out ulong)
[Version("2.38")]
bool MeasureDiskUsage(FileMeasureFlags flags, Cancellable? cancellable, FileMeasureProgressCallback? progressCallback, out ulong diskUsage, out ulong numDirs, out ulong numFiles)
Parameters
flagsFileMeasureFlagscancellableCancellableprogressCallbackFileMeasureProgressCallbackA callback. If it raises an exception the application will terminate. To receive this unhandled exception see SetHandler(Action<Exception>?).
diskUsageulongnumDirsulongnumFilesulong
Returns
MeasureDiskUsageFinish(AsyncResult, out ulong, out ulong, out ulong)
[Version("2.38")]
bool MeasureDiskUsageFinish(AsyncResult result, out ulong diskUsage, out ulong numDirs, out ulong numFiles)
Parameters
resultAsyncResultdiskUsageulongnumDirsulongnumFilesulong
Returns
Monitor(FileMonitorFlags, Cancellable?)
[Version("2.18")]
FileMonitor Monitor(FileMonitorFlags flags, Cancellable? cancellable)
Parameters
flagsFileMonitorFlagscancellableCancellable
Returns
MonitorDirectory(FileMonitorFlags, Cancellable?)
FileMonitor MonitorDirectory(FileMonitorFlags flags, Cancellable? cancellable)
Parameters
flagsFileMonitorFlagscancellableCancellable
Returns
MonitorFile(FileMonitorFlags, Cancellable?)
FileMonitor MonitorFile(FileMonitorFlags flags, Cancellable? cancellable)
Parameters
flagsFileMonitorFlagscancellableCancellable
Returns
MountEnclosingVolumeFinish(AsyncResult)
bool MountEnclosingVolumeFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
MountMountableFinish(AsyncResult)
File MountMountableFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
Move(File, FileCopyFlags, Cancellable?, FileProgressCallback?)
bool Move(File destination, FileCopyFlags flags, Cancellable? cancellable, FileProgressCallback? progressCallback)
Parameters
destinationFileflagsFileCopyFlagscancellableCancellableprogressCallbackFileProgressCallbackA callback. If it raises an exception the application will terminate. To receive this unhandled exception see SetHandler(Action<Exception>?).
Returns
MoveAsync(File, FileCopyFlags, int, Cancellable?, Closure?, Closure)
[Version("2.82")]
void MoveAsync(File destination, FileCopyFlags flags, int ioPriority, Cancellable? cancellable, Closure? progressCallbackClosure, Closure readyCallbackClosure)
Parameters
destinationFileflagsFileCopyFlagsioPriorityintcancellableCancellableprogressCallbackClosureClosurereadyCallbackClosureClosure
MoveFinish(AsyncResult)
[Version("2.72")]
bool MoveFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
OpenReadwrite(Cancellable?)
[Version("2.22")]
FileIOStream OpenReadwrite(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
OpenReadwriteFinish(AsyncResult)
[Version("2.22")]
FileIOStream OpenReadwriteFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
PeekPath()
[Version("2.56")]
string? PeekPath()
Returns
PollMountableFinish(AsyncResult)
[Version("2.22")]
bool PollMountableFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
QueryDefaultHandler(Cancellable?)
AppInfo QueryDefaultHandler(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
QueryDefaultHandlerFinish(AsyncResult)
[Version("2.60")]
AppInfo QueryDefaultHandlerFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
QueryExists(Cancellable?)
bool QueryExists(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
QueryFileType(FileQueryInfoFlags, Cancellable?)
[Version("2.18")]
FileType QueryFileType(FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
flagsFileQueryInfoFlagscancellableCancellable
Returns
QueryFilesystemInfo(string, Cancellable?)
FileInfo QueryFilesystemInfo(string attributes, Cancellable? cancellable)
Parameters
attributesstringcancellableCancellable
Returns
QueryFilesystemInfoFinish(AsyncResult)
FileInfo QueryFilesystemInfoFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
QueryInfo(string, FileQueryInfoFlags, Cancellable?)
FileInfo QueryInfo(string attributes, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
attributesstringflagsFileQueryInfoFlagscancellableCancellable
Returns
QueryInfoFinish(AsyncResult)
FileInfo QueryInfoFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
QuerySettableAttributes(Cancellable?)
FileAttributeInfoList QuerySettableAttributes(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
QueryWritableNamespaces(Cancellable?)
FileAttributeInfoList QueryWritableNamespaces(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
Read(Cancellable?)
FileInputStream Read(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
ReadFinish(AsyncResult)
FileInputStream ReadFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
Replace(string?, bool, FileCreateFlags, Cancellable?)
FileOutputStream Replace(string? etag, bool makeBackup, FileCreateFlags flags, Cancellable? cancellable)
Parameters
etagstringmakeBackupboolflagsFileCreateFlagscancellableCancellable
Returns
ReplaceContents(Span<byte>, string?, bool, FileCreateFlags, out string?, Cancellable?)
bool ReplaceContents(Span<byte> contents, string? etag, bool makeBackup, FileCreateFlags flags, out string? newEtag, Cancellable? cancellable)
Parameters
contentsSpan<byte>etagstringmakeBackupboolflagsFileCreateFlagsnewEtagstringcancellableCancellable
Returns
ReplaceContentsFinish(AsyncResult, out string?)
bool ReplaceContentsFinish(AsyncResult res, out string? newEtag)
Parameters
resAsyncResultnewEtagstring
Returns
ReplaceFinish(AsyncResult)
FileOutputStream ReplaceFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
ReplaceReadwrite(string?, bool, FileCreateFlags, Cancellable?)
[Version("2.22")]
FileIOStream ReplaceReadwrite(string? etag, bool makeBackup, FileCreateFlags flags, Cancellable? cancellable)
Parameters
etagstringmakeBackupboolflagsFileCreateFlagscancellableCancellable
Returns
ReplaceReadwriteFinish(AsyncResult)
[Version("2.22")]
FileIOStream ReplaceReadwriteFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
ResolveRelativePath(string)
File ResolveRelativePath(string relativePath)
Parameters
relativePathstring
Returns
SetAttribute(string, FileAttributeType, nint, FileQueryInfoFlags, Cancellable?)
bool SetAttribute(string attribute, FileAttributeType type, nint valueP, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
attributestringtypeFileAttributeTypevaluePnintflagsFileQueryInfoFlagscancellableCancellable
Returns
SetAttributeByteString(string, string, FileQueryInfoFlags, Cancellable?)
bool SetAttributeByteString(string attribute, string value, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
attributestringvaluestringflagsFileQueryInfoFlagscancellableCancellable
Returns
SetAttributeInt32(string, int, FileQueryInfoFlags, Cancellable?)
bool SetAttributeInt32(string attribute, int value, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
attributestringvalueintflagsFileQueryInfoFlagscancellableCancellable
Returns
SetAttributeInt64(string, long, FileQueryInfoFlags, Cancellable?)
bool SetAttributeInt64(string attribute, long value, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
attributestringvaluelongflagsFileQueryInfoFlagscancellableCancellable
Returns
SetAttributeString(string, string, FileQueryInfoFlags, Cancellable?)
bool SetAttributeString(string attribute, string value, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
attributestringvaluestringflagsFileQueryInfoFlagscancellableCancellable
Returns
SetAttributeUint32(string, uint, FileQueryInfoFlags, Cancellable?)
bool SetAttributeUint32(string attribute, uint value, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
attributestringvalueuintflagsFileQueryInfoFlagscancellableCancellable
Returns
SetAttributeUint64(string, ulong, FileQueryInfoFlags, Cancellable?)
bool SetAttributeUint64(string attribute, ulong value, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
attributestringvalueulongflagsFileQueryInfoFlagscancellableCancellable
Returns
SetAttributesFromInfo(FileInfo, FileQueryInfoFlags, Cancellable?)
bool SetAttributesFromInfo(FileInfo info, FileQueryInfoFlags flags, Cancellable? cancellable)
Parameters
infoFileInfoflagsFileQueryInfoFlagscancellableCancellable
Returns
SetDisplayName(string, Cancellable?)
File SetDisplayName(string displayName, Cancellable? cancellable)
Parameters
displayNamestringcancellableCancellable
Returns
SetDisplayNameFinish(AsyncResult)
File SetDisplayNameFinish(AsyncResult res)
Parameters
resAsyncResult
Returns
StartMountableFinish(AsyncResult)
[Version("2.22")]
bool StartMountableFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
StopMountableFinish(AsyncResult)
[Version("2.22")]
bool StopMountableFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
SupportsThreadContexts()
[Version("2.22")]
bool SupportsThreadContexts()
Returns
Trash(Cancellable?)
bool Trash(Cancellable? cancellable)
Parameters
cancellableCancellable
Returns
TrashFinish(AsyncResult)
[Version("2.38")]
bool TrashFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
UnmountMountableFinish(AsyncResult)
bool UnmountMountableFinish(AsyncResult result)
Parameters
resultAsyncResult
Returns
UnmountMountableWithOperationFinish(AsyncResult)
[Version("2.22")]
bool UnmountMountableWithOperationFinish(AsyncResult result)
Parameters
resultAsyncResult