FileSystem Class
Interface to the Linux File System in User Space (FUSE) Library.
|
Thread Safety
Remarks
The Mono.Fuse.FileSystem type facilitates the implementation of FUSE file system programs. Subclasses can override the FileSystem methods to subscribe and respond to file system events, allowing any other program to communicate with the FileSystem subclass as if it were a file system.
Overridable methods correspond to the following categories:
- Directory management methods: FileSystem.OnCreateDirectory, FileSystem.OnRemoveDirectory, FileSystem.OnOpenDirectory, FileSystem.OnReadDirectory, FileSystem.OnSynchronizeDirectory, FileSystem.OnReleaseDirectory.
- File management methods: FileSystem.OnCreateSpecialFile, FileSystem.OnRemoveFile, FileSystem.OnTruncateFile.
- FileSystem status methods: FileSystem.OnGetFileSystemStatus.
- Link manipulation methods: FileSystem.OnCreateHardLink, FileSystem.OnCreateSymbolicLink, FileSystem.OnReadSymbolicLink.
- Handle (opened file) management methods: FileSystem.OnCreateHandle, FileSystem.OnOpenHandle, FileSystem.OnReadHandle, FileSystem.OnWriteHandle, FileSystem.OnFlushHandle, FileSystem.OnSynchronizeHandle, FileSystem.OnTruncateHandle, FileSystem.OnGetHandleStatus, FileSystem.OnReleaseHandle.
- Path (file and directory) management methods: FileSystem.OnAccessPath, FileSystem.OnGetPathStatus, FileSystem.OnChangePathPermissions, FileSystem.OnChangePathOwner, FileSystem.OnChangePathTimes, FileSystem.OnGetPathExtendedAttribute, FileSystem.OnListPathExtendedAttributes, FileSystem.OnSetPathExtendedAttribute, FileSystem.OnRemovePathExtendedAttribute, FileSystem.OnRenamePath.
Inherited classes must be thread-safe by default. If the inherited class cannot be thread safe, then the FileSystem.MultiThreaded property should be set to false, or the -s program argument should be passed to FileSystem.ParseFuseArguments or the Mono.Fuse.FileSystem(System.String[]) constructor.
Not all methods need to be overridden. If a method isn't overridden, then Mono.Unix.Native.Errno.ENOSYS will be returned to the calling program, and nothing will happen when that operation is requested. For example, if you don't override FileSystem.OnCreateDirectory, then if a program attempts to call Mono.Unix.Native.Syscall.mkdir (e.g. through the mkdir(1) program) it will get an error, and the operation will not continue.
Some methods need to be implemented in sets, or a InvalidOperationException will be generated from FileSystem.Start. These sets are:
Examples
The following sample file system will return the contents of SimpleFS.names when the directory is read.
| C# Example |
using System;
using System.Collections.Generic;
using Mono.Fuse;
using Mono.Unix.Native;
class SimpleFS : FileSystem {
private List<string> names = new List<string> ();
public SimpleFS (string[] args) : base (args)
{
names.Add ("/foo");
names.Add ("/bar");
names.Add ("/baz");
}
protected override Errno OnReadDirectory (string directory, OpenedPathInfo info,
out IEnumerable<DirectoryEntry> names)
{
if (directory != "/") {
names = null;
return Errno.ENOENT;
}
names = ListNames (directory);
return 0;
}
private IEnumerable<DirectoryEntry> ListNames (string directory)
{
foreach (string name in names) {
yield return new DirectoryEntry (name.Substring (1));
}
}
protected override Errno OnGetPathStatus (string path, ref Stat stbuf)
{
stbuf = new Stat ();
if (path == "/") {
stbuf.st_mode = NativeConvert.FromUnixPermissionString ("dr-xr-xr-x");
stbuf.st_nlink = 1;
return 0;
}
if (!names.Contains (path))
return Errno.ENOENT;
stbuf.st_mode = NativeConvert.FromUnixPermissionString ("-r--r--r--");
return 0;
}
public static void Main (string[] args)
{
using (SimpleFS fs = new SimpleFS (args)) {
fs.Start ();
}
}
}
|
The above program can be compiled as:
| sh Example |
gmcs -r:Mono.Fuse.dll -r:Mono.Posix.dll SimpleFS.cs |
The resulting program can then be used by executing it and using normal shell programs to interact with it.
| sh Example |
$ mono SimpleFS.exe mountpoint & $ ls -1 mountpoint bar baz foo |
The program can be terminated by unmounting mountpoint by using the fusermount program:
| sh Example |
fusermount -u mountpoint |
Members
See Also: Inherited members from object.
Protected Constructors
|
FileSystem
()
Creates and initializes a new instance of the
Mono.Fuse.FileSystem class.
|
| Creates and initializes a new instance of the Mono.Fuse.FileSystem class for the specified mount point. |
|
FileSystem
(string[])
Creates and initializes a new instance of the
Mono.Fuse.FileSystem class using the specified arguments.
|
Properties
|
AllowAccessToOthers
|
bool . Allow access to other users. |
|
AllowAccessToRoot
|
bool . Allow access to other users. |
|
AllowMountOverNonEmptyDirectory
|
bool . Allow mounting over a non-empty directory. |
|
AttributeTimeout
|
double . Cache timeout for attributes. |
|
DefaultGroupId
|
long . Default file owner Group ID. |
|
DefaultUmask
|
Mono.Unix.Native.FilePermissions . Default file umask. |
|
DefaultUserId
|
long . Default file owner User ID. |
|
DeletedPathTimeout
|
double . Cache timeout for deleted path names. |
|
EnableDirectIO
|
bool . Enable Direct I/O. |
|
EnableFuseDebugOutput
|
bool . Enable generation of FUSE debug messages to the standard output stream. |
|
EnableKernelCache
|
bool . Cache files in kernel. |
|
EnableKernelPermissionChecking
|
bool . Enable permission checking by the OS kernel. |
|
EnableLargeReadRequests
|
bool . Issue large read requests. |
| FuseOptions [read-only] | System.Collections.Generic.IDictionary<System.String,System.String> . FUSE startup options. |
|
ImmediatePathRemoval
|
bool . Immediately remove file and directories, don't hide them. |
|
MaxReadSize
|
int . Gets or sets the maximum size of read requests. |
|
MountPoint
|
string . The directory to mount the file system over. |
|
MultiThreaded
|
bool . Controls whether FUSE will invoke Mono.Fuse.FileSystem methods in a multithreaded manner. |
|
Name
|
string . Gets or sets the file system name. |
|
PathTimeout
|
double . Cache timeout for path names. |
|
ReaddirSetsInode
|
bool . Readdir sets inodes. |
|
SetsInodes
|
bool . FileSystem sets inode numbers. |
Methods
|
Dispose
()
Cleans up FUSE resources.
|
|
|
ParseFuseArguments
(string[])
Parses args looking for FUSE options.
|
|
| static |
ShowFuseHelp
(string)
Writes FUSE argument information to your programs standard error stream.
|
|
Start
()
Initializes FUSE and starts file system event processing.
|
|
|
Stop
()
Exits the FUSE event loop.
|
Protected Methods
Member Details
FileSystem Constructor
FileSystem Constructor
Creates and initializes a new instance of the Mono.Fuse.FileSystem class for the specified mount point.
Parameters
- mountPoint
- A string containing the directory that should be mounted.
Remarks
FileSystem Constructor
Creates and initializes a new instance of the Mono.Fuse.FileSystem class using the specified arguments.
Parameters
- args
- A string array containing FUSE arguments and the mountpoint.
Remarks
ParseFuseArguments Method
Parses args looking for FUSE options.
Parameters
- args
- A string array containing the arguments to initialize the FUSE library with.
Returns
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | If args contains a -o argument without a following string or string=value argument. |
Remarks
This method parses args looking for FUSE-formatted arguments. A FUSE-formatted argument is one of:
- -d to enable FUSE debug output. This is also equivalent to -odebug.
- -f to enable foreground output. This is the only permitted behavior anyway, so it's simply ignored.
- -s to disable multithreading support within FUSE. By default multithreading is enabled. (See also FileSystem.MultiThreaded.)
- Any argument of the form -ostring, -ostring=value, and the argument pairs -o string, -o string=value. Any argument or argument pair matching this pattern will be handled by ParseFuseArguments.
This method initializes the FileSystem.FuseOptions property to contain the specified arguments.
Note:
If any non-FUSE arguments are captured by this method, they will be stored in FileSystem.FuseOptions and provided to FUSE during the FileSystem.Start method. If any non-FUSE arguments are passed to FUSE, FUSE will report an error.
Do not pass non-FUSE arguments to FUSE.
ShowFuseHelp Method
Writes FUSE argument information to your programs standard error stream.
Parameters
- appname
- A string containing the program name to display within the help text.
Remarks
Examples
FileSystem.ShowFuseHelp should be used to augment your help text generation when handling the standard --help argument.
| C# Example |
using System;
using Mono.Fuse;
class Help {
public static void Main ()
{
FileSystem.ShowFuseHelp ("helpfs");
Console.Error.WriteLine ("helpfs options:");
Console.Error.WriteLine (" --argument-name-here Summary Information");
}
}
|
The above program generates the output:
| output Example |
usage: helpfs mountpoint [options]
general options:
-o opt,[opt...] mount options
-h --help print help
-V --version print version
FUSE options:
-d -o debug enable debug output (implies -f)
-f foreground operation
-s disable multi-threaded operation
-o allow_other allow access to other users
-o allow_root allow access to root
-o nonempty allow mounts over non-empty file/dir
-o default_permissions enable permission checking by kernel
-o fsname=NAME set filesystem name
-o large_read issue large read requests (2.4 only)
-o max_read=N set maximum size of read requests
-o hard_remove immediate removal (don't hide files)
-o use_ino let filesystem set inode numbers
-o readdir_ino try to fill in d_ino in readdir
-o direct_io use direct I/O
-o kernel_cache cache files in kernel
-o umask=M set file permissions (octal)
-o uid=N set file owner
-o gid=N set file group
-o entry_timeout=T cache timeout for names (1.0s)
-o negative_timeout=T cache timeout for deleted names (0.0s)
-o attr_timeout=T cache timeout for attributes (1.0s)
helpfs options:
--argument-name-here Summary Information
|
Dispose Method
Cleans up FUSE resources.
Remarks
This method should be called when FileSystem.Start returns.
If a subclass needs to cleanup its resources, it should override FileSystem.Dispose(bool).
Dispose Method
Release resources associated with this instance.
Parameters
- disposing
- A bool specifying whether this was called as a result of an explicit FileSystem.Dispose() call instead of through the finalizer.
Remarks
Subclasses should override this method if they need to release resources during class cleanup.
Overridding implementations must call the Mono.Fuse.FileSystem base method as part of their implementation so that Mono.Fuse.FileSystem has a chance to cleanup FUSE.
Start Method
Initializes FUSE and starts file system event processing.
See Also
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException |
FileSystem.MountPoint is null. -or- A file operation "set" was not fully implemented. Sets include: |
| NotSupportedException |
There was an error initializing FUSE. This is frequently because the FUSE kernel module hasn't been loaded (try running /sbin/modprobe fuse as the root user) or FileSystem.MountPoint could not be mounted (it's not empty or it's already mounted). FileSystem.MountPoint could not be mounted. -or A new FUSE instance could not be created. |
Remarks
Creates a FUSE argument based on FileSystem.FuseOptions, initializes FUSE with these arguments, mounts the directory FileSystem.MountPoint, and starts event processing.
If FileSystem.MultiThreaded is true, then FUSE will be allowed to invoke Mono.Fuse.FileSystem operations in a multithreaded manner. Otherwise, only a single thread will be used to invoke FileSystem operations.
This method will not return until FileSystem.MountPoint is unmounted using the fusermount program or the FileSystem.Stop method is invoked.
Stop Method
Exits the FUSE event loop.
Remarks
GetOperationContext Method
Gets a Mono.Fuse.FileSystemOperationContext instance containing additional contextual information for the current operation.
Returns
Remarks
OnGetPathStatus Method
Get file or directory attributes.
Parameters
- path
- A string containing the file or directory to get the status of.
- stat
- A Mono.Unix.Native.Stat that will hold status information for path.
Returns
Returns 0 if successful; otherwise, returns the reason for the failure.
The following errors can be returned:
| Error | Details |
|---|---|
| Mono.Unix.Native.Errno.EACCES |
Search permission is denied for a component of the path prefix. |
| Mono.Unix.Native.Errno.EIO |
An I/O error occurred while reading from or writing to the file system. |
| Mono.Unix.Native.Errno.ELOOP |
Too many symbolic links were encountered in translating the pathname. |
| Mono.Unix.Native.Errno.ENAMETOOLONG |
A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. |
| Mono.Unix.Native.Errno.ENOENT |
The named file does not exist. |
| Mono.Unix.Native.Errno.ENOTDIR |
A component of the path prefix is not a directory. |
| Mono.Unix.Native.Errno.EOVERFLOW |
The file size in bytes cannot be represented correctly in the structure pointed to by stat . |
Remarks
Similar to Mono.Unix.Native.Syscall.stat. The Mono.Unix.Native.Stat.st_dev and Mono.Unix.Native.Stat.st_blksize fields are ignored.
The Mono.Unix.Native.Stat.st_ino field is ignored unless the FileSystem.SetsInodes mount option is true.
Overriding implementations should not generate an exception. All exceptions which escape this method are translated into Mono.Unix.Native.Errno.EIO.
OnReadSymbolicLink Method
Read the target of a symbolic link.
Parameters
Returns
Returns 0 if successful; otherwise, returns the reason for the failure.
The following errors can be returned:
| Error | Details |
|---|---|
| Mono.Unix.Native.Errno.ENOTDIR |
A component of the path prefix is not a directory. |
| Mono.Unix.Native.Errno.ENAMETOOLONG |
A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. |
| Mono.Unix.Native.Errno.ENOENT |
The named file does not exist. |
| Mono.Unix.Native.Errno.EACCES |
Search permission is denied for a component of the path prefix. |
| Mono.Unix.Native.Errno.ELOOP |
Too many symbolic links were encountered in translating the pathname. |
| Mono.Unix.Native.Errno.EINVAL |
The named file is not a symbolic link. |
| Mono.Unix.Native.Errno.EIO |
An I/O error occurred while reading from the file system. |
Remarks
Simiar to Mono.Unix.Native.Syscall.readlink.
Overriding implementations should not generate an exception. All exceptions which escape this method are translated into Mono.Unix.Native.Errno.EIO.
OnCreateSpecialFile Method
Create a special or ordinary file.
Parameters
- file
- A string containing the file or directory to get the status of.
- perms
- A Mono.Unix.Native.FilePermissions instance containing the permissions of the file to create.
- dev
- If perms is of the type Mono.Unix.Native.FilePermissions.S_IFCHR or Mono.Unix.Native.FilePermissions.S_IFBLK thsn dev is a ulong containing the major and minor numbers of the newly created device special file; otherwise, dev is ignored.
Returns
Returns 0 if successful; otherwise, returns the reason for the failure.
The following errors can be returned:
| Error | Details |
|---|---|
| Mono.Unix.Native.Errno.ENOTDIR |
A component of the path prefix is not a directory. |
| Mono.Unix.Native.Errno.ENAMETOOLONG |
A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. |
| Mono.Unix.Native.Errno.ENOENT |
A component of the path prefix does not exist. |
| Mono.Unix.Native.Errno.EACCES |
Search permission is denied for a component of the path prefix. |
| Mono.Unix.Native.Errno.ELOOP |
Too many symbolic links were encountered in translating the pathname. |
| Mono.Unix.Native.Errno.EPERM |
The process's effective user ID is not super-user. |
| Mono.Unix.Native.Errno.EIO |
An I/O error occurred while making the directory entry or allocating the inode. |
| Mono.Unix.Native.Errno.ENOSPC |
The directory in which the entry for the new node is being placed cannot be extended because there is no space left on the file system containing the directory. |
| Mono.Unix.Native.Errno.ENOSPC |
There are no free inodes on the file system on which the node is being created. |
| Mono.Unix.Native.Errno.EDQUOT |
The directory in which the entry for the new node is being placed cannot be extended because the user's quota of disk blocks on the file system containing the directory has been exhausted. |
| Mono.Unix.Native.Errno.EDQUOT |
The user's quota of inodes on the file system on which the node is being created has been exhausted. |
| Mono.Unix.Native.Errno.EROFS |
The named file resides on a read-only file system. |
| Mono.Unix.Native.Errno.EEXIST |
The named file exists. |
| Mono.Unix.Native.Errno.EINVAL |
Creating anything else than a block or character special file (or a whiteout ) is not supported. |
Remarks
Simiar to Mono.Unix.Native.Syscall.mknod. This is the Mono.Unix.Native.Syscall.mknod.
This is called for the creation of all non-directory, non-symlink nodes unless FileSystem.OnCreateHandle is overridden.
Overriding implementations should not generate an exception. All exceptions which escape this method are translated into Mono.Unix.Native.Errno.EIO.
OnCreateDirectory Method
Create a directory.
Parameters
- directory
- A string containing the file or directory to get the status of.
- mode
- A Mono.Unix.Native.FilePermissions instance containing the permissions of the directory to create.
Returns
Returns 0 if successful; otherwise, returns the reason for the failure.
The following errors can be returned:
| Error | Details |
|---|---|
| Mono.Unix.Native.Errno.ENOTDIR |
A component of the path prefix is not a directory. |
| Mono.Unix.Native.Errno.ENAMETOOLONG |
A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. |
| Mono.Unix.Native.Errno.ENOENT |
A component of the path prefix does not exist. |
| Mono.Unix.Native.Errno.EACCES |
Search permission is denied for a component of the path prefix, or write permission is denied on the parent directory of the directory to be created. |
| Mono.Unix.Native.Errno.ELOOP |
Too many symbolic links were encountered in translating the pathname. |
| Mono.Unix.Native.Errno.EROFS |
The named file resides on a read-only file system. |
| Mono.Unix.Native.Errno.EEXIST |
The named file exists. |
| Mono.Unix.Native.Errno.ENOSPC |
The new directory cannot be created because there is no space left on the file system that will contain the directory. |
| Mono.Unix.Native.Errno.ENOSPC |
There are no free inodes on the file system on which the directory is being created. |
| Mono.Unix.Native.Errno.EDQUOT |
The new directory cannot be created because the user's quota of disk blocks on the file system that will contain the directory has been exhausted. |
| Mono.Unix.Native.Errno.EDQUOT |
The user's quota of inodes on the file system on which the directory is being created has been exhausted. |
| Mono.Unix.Native.Errno.EIO |
An I/O error occurred while making the directory entry or allocating the inode. |
| Mono.Unix.Native.Errno.EIO |
An I/O error occurred while reading from or writing to the file system. |
Remarks
Overriding implementations should not generate an exception. All exceptions which escape this method are translated into Mono.Unix.Native.Errno.EIO.
OnRemoveFile Method
Remove a directory entry.
Parameters
- file
- A string containing the file or directory to get the status of.
Returns
Returns 0 if successful; otherwise, returns the reason for the failure.
The following errors can be returned:
| Error | Details |
|---|---|
| Mono.Unix.Native.Errno.ENOTDIR |
A component of the path prefix is not a directory. |
| Mono.Unix.Native.Errno.ENAMETOOLONG |
A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. |
| Mono.Unix.Native.Errno.ENOENT |
The named file does not exist. |
| Mono.Unix.Native.Errno.EACCES |
Search permission is denied for a component of the path prefix. |
| Mono.Unix.Native.Errno.EACCES |
Write permission is denied on the directory containing the link to be removed. |
| Mono.Unix.Native.Errno.ELOOP |
Too many symbolic links were encountered in translating the pathname. |
| Mono.Unix.Native.Errno.EPERM |
The named file is a directory. |
| Mono.Unix.Native.Errno.EPERM |
The named file has its immutable or append-only flag set, see the Mono.Unix.Native.Syscall.chflags(2) manual page for more information. |
| Mono.Unix.Native.Errno.EPERM |
The directory containing the file is marked sticky, and neither the containing directory nor the file to be removed are owned by the effective user ID. |
| Mono.Unix.Native.Errno.EBUSY |
The entry to be unlinked is the mount point for a mounted file system. |
| Mono.Unix.Native.Errno.EIO |
An I/O error occurred while deleting the directory entry or deallocating the inode. |
| Mono.Unix.Native.Errno.EROFS |
The named file resides on a read-only file system. |
Remarks
Similar to Mono.Unix.Native.Syscall.unlink.
Overriding implementations should not generate an exception. All exceptions which escape this method are translated into Mono.Unix.Native.Errno.EIO.
OnRemoveDirectory Method
Remove a directory
Parameters
- directory
- A string containing the directory to remove.
Returns
Returns 0 if successful; otherwise, returns the reason for the failure.
The following errors can be returned:
| Error | Details |
|---|---|
| Mono.Unix.Native.Errno.ENOTDIR |
A component of the path is not a directory. |
| Mono.Unix.Native.Errno.ENAMETOOLONG |
A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. |
| Mono.Unix.Native.Errno.ENOENT |
The named directory does not exist. |
| Mono.Unix.Native.Errno.ELOOP |
Too many symbolic links were encountered in translating the pathname. |
| Mono.Unix.Native.Errno.ENOTEMPTY |
The named directory contains files other than "." and ".." in it. |
| Mono.Unix.Native.Errno.EACCES |
Search permission is denied for a component of the path prefix. |
| Mono.Unix.Native.Errno.EACCES |
Write permission is denied on the directory containing the link to be removed. |
| Mono.Unix.Native.Errno.EPERM |
The directory containing the directory to be removed is marked sticky, and neither the containing directory nor the directory to be removed are owned by the effective user ID. |
| Mono.Unix.Native.Errno.EBUSY |
The directory to be removed is the mount point for a mounted file system. |
| Mono.Unix.Native.Errno.EIO |
An I/O error occurred while deleting the directory entry or deallocating the inode. |
| Mono.Unix.Native.Errno.EROFS |
The directory entry to be removed resides on a read-only file system. |
Remarks
Similar to Mono.Unix.Native.Syscall.rmdir.
Overriding implementations should not generate an exception. All exceptions which escape this method are translated into Mono.Unix.Native.Errno.EIO.
OnCreateSymbolicLink Method
Create a symbolic link.
Parameters
Returns
Returns 0 if successful; otherwise, returns the reason for the failure.
The following errors can be returned:
| Error | Details |
|---|---|
| Mono.Unix.Native.Errno.ENOTDIR |
A component of the name2 prefix is not a directory. |
| Mono.Unix.Native.Errno.ENAMETOOLONG |
A component of either pathname exceeded 255 characters, or the entire length of either path name exceeded 1023 characters. |
| Mono.Unix.Native.Errno.ENOENT |
The named file does not exist. |
| Mono.Unix.Native.Errno.EACCES |
A component of the link path prefix denies search permission. |
| Mono.Unix.Native.Errno.ELOOP |
Too many symbolic links were encountered in translating the pathname. |
| Mono.Unix.Native.Errno.EEXIST |
The path name pointed at by the link argument already exists. |
| Mono.Unix.Native.Errno.EIO |
An I/O error occurred while making the directory entry for link , or allocating the inode for link , or writing out the link contents of link . |
| Mono.Unix.Native.Errno.EROFS |
The file link would reside on a read-only file system. |
| Mono.Unix.Native.Errno.ENOSPC |
The directory in which the entry for the new symbolic link is being placed cannot be extended because there is no space left on the file system containing the directory. |
| Mono.Unix.Native.Errno.ENOSPC |
The new symbolic link cannot be created because there is no space left on the file system that will contain the symbolic link. |
| Mono.Unix.Native.Errno.ENOSPC |
There are no free inodes on the file system on which the symbolic link is being created. |
| Mono.Unix.Native.Errno.EDQUOT |
The directory in which the entry for the new symbolic link is being placed cannot be extended because the user's quota of disk blocks on the file system containing the directory has been exhausted. |
| Mono.Unix.Native.Errno.EDQUOT |
The new symbolic link cannot be created because the user's quota of disk blocks on the file system that will contain the symbolic link has been exhausted. |
| Mono.Unix.Native.Errno.EDQUOT |
The user's quota of inodes on the file system on which the symbolic link is being created has been exhausted. |
| Mono.Unix.Native.Errno.EIO |
An I/O error occurred while making the directory entry or allocating the inode. |
Remarks
Similar to Mono.Unix.Native.Syscall.symlink.
Overriding implementations should not generate an exception. All exceptions which escape this method are translated into Mono.Unix.Native.Errno.EIO.
OnRenamePath Method
Rename a file or directory.
Parameters
Returns
Returns 0 if successful; otherwise, returns the reason for the failure.
The following errors can be returned:
| Error | Details |
|---|---|
| Mono.Unix.Native.Errno.ENAMETOOLONG |
A component of either pathname exceeded 255 characters, or the entire length of either path name exceeded 1023 characters. |