Mono.Fuse : Mono.Fuse Namespace

OpenedPathInfo Class

Contains information about an opened file or directory.

public sealed class OpenedPathInfo

See Also

FileSystem.OnCreateHandle
FileSystem.OnOpenDirectory
FileSystem.OnOpenHandle

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Remarks

The Mono.Fuse.OpenedPathInfo class provides information about a request to open a file or directory, and information for using an opened file or directory.

Requirements

Namespace: Mono.Fuse
Assembly: Mono.Fuse (in Mono.Fuse.dll)
Assembly Versions: 0.0.0.0

Members

See Also: Inherited members from object.

Public Properties

DirectIO bool . Indicates whether or not direct I/O can be used on this file.
Handle IntPtr . Handle to an open file or directory.
KeepCache bool . Indicates that cached file data should not be invalidated.
[read-only]
OpenAccess Mono.Unix.Native.OpenFlags . Gets a Mono.Unix.Native.OpenFlags instance containing a specification for how the resource (file or directory) should be accessed.
OpenFlags Mono.Unix.Native.OpenFlags . Gets a Mono.Unix.Native.OpenFlags instance containing a specification for how the resource (file or directory) should be opened.
WritePage int . Indicates if a write operation was caused by a writepage.

Member Details

OpenFlags Property

Gets a Mono.Unix.Native.OpenFlags instance containing a specification for how the resource (file or directory) should be opened.

public Mono.Unix.Native.OpenFlags OpenFlags { set; get; }

See Also

Value

A Mono.Unix.Native.OpenFlags instance containing a specification for how the resource (file or directory) should be opened or was opened.

Remarks

The Mono.Unix.Native.OpenFlags value contains two sets of information:

  • How the file should be opened, (e.g. read-only, read/write).
  • Miscellaneous information, (open exclusively, truncate on open, open for appending, large file support, etc.).

The OpenedPathInfo.OpenAccess property returns the first piece of information as a convenience property so that no bitwise masking is required to determine how the file should be opened.

Requirements

Namespace: Mono.Fuse
Assembly: Mono.Fuse (in Mono.Fuse.dll)

OpenAccess Property

Gets a Mono.Unix.Native.OpenFlags instance containing a specification for how the resource (file or directory) should be accessed.

public Mono.Unix.Native.OpenFlags OpenAccess { get; }

See Also

Value

A Mono.Unix.Native.OpenFlags instance containing a specification for how the resource (file or directory) should be accessed or was opened.

Remarks

This property returns OpenedPathInfo.OpenFlags value masked so that it will only return one of:

Value Description
Mono.Unix.Native.OpenFlags.O_RDONLY The file or directory should be opened read-only.
Mono.Unix.Native.OpenFlags.O_RDWR The file or directory should be opened read-write.
Mono.Unix.Native.OpenFlags.O_WRONLY The file or directory should be opened write-only.

Requirements

Namespace: Mono.Fuse
Assembly: Mono.Fuse (in Mono.Fuse.dll)

WritePage Property

Indicates if a write operation was caused by a writepage.

public int WritePage { set; get; }

Value

A int indicating if this write operation was caused by a writepage operation.

Remarks

Should this be a bool?.

TODO: What is a writepage operation?

Requirements

Namespace: Mono.Fuse
Assembly: Mono.Fuse (in Mono.Fuse.dll)

DirectIO Property

Indicates whether or not direct I/O can be used on this file.

public bool DirectIO { set; get; }

See Also

Value

A bool indicating whether or not direct I/O can be used on this file.

Remarks

This should only be changed by FileSystem.OnCreateHandle or FileSystem.OnOpenHandle.

Requirements

Namespace: Mono.Fuse
Assembly: Mono.Fuse (in Mono.Fuse.dll)

KeepCache Property

Indicates that cached file data should not be invalidated.

public bool KeepCache { set; get; }

See Also

Value

A bool indicating that cached file data need not be invalidated.

Remarks

This should only be changed by FileSystem.OnCreateHandle or FileSystem.OnOpenHandle.

Requirements

Namespace: Mono.Fuse
Assembly: Mono.Fuse (in Mono.Fuse.dll)

Handle Property

Handle to an open file or directory.

public IntPtr Handle { set; get; }

See Also

Value

A IntPtr containing a handle to an open file or directory.

Remarks

This can be set in an open operation (FileSystem.OnCreateHandle, FileSystem.OnOpenHandle, FileSystem.OnOpenDirectory) so that its value is available from the other related operations (FileSystem.OnReadDirectory, FileSystem.OnReadHandle, FileSystem.OnWriteHandle, etc.).

If set in an open operation, then the underlying resource should be released in the appropriate corresponding close operation (FileSystem.OnReleaseDirectory, FileSystem.OnReleaseHandle).

This does not need to be set to support reading and writing. For example, if FileSystem.OnOpenHandle is not overridden, a file can still be "opened" for reading & writing as long as the Mono.Unix.Native.Stat.st_mode instance filled in by FileSystem.OnGetPathStatus permits reading or writing. In this case, if e.g. FileSystem.OnReadHandle is overridden then it will be invoked with a OpenedPathInfo.Handle value of IntPtr.Zero.

It is recommended that this property be used, so that if a file or directory is renamed (FileSystem.OnRenamePath) while a file is open the reading program won't notice and get "bizarre" data.

Requirements

Namespace: Mono.Fuse
Assembly: Mono.Fuse (in Mono.Fuse.dll)