Mono.Posix 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Object Provides information and performs operations on file system entries.

The class provides information about a file system entry and permits file system entry manipulation such as:

Determining the full file name with .
Determining whether the file exists with
Querying file system entry metadata such as the hardware device it resides on (), the file system inode (), file access permissions (), file type (), file owner information (), group information (), file size (), various times maintained by the operating system (, , ), and more.
Creating hard links with .
Creating symbolic links with .
File system entry deletion with .
Setting file system owner and group information with .

Information provided by this type may not be valid for any significant period of time, due to potential race conditions with other processes running on the system or because of file management actions performed within the current process.

The only guarantee is that the information provided was valid at some point in time, or an exception will be thrown when attempting to access the provided information. To clarify, once the file system entry is found, it won't be checked for again until a call to . FullName will be checked for during object construction, but need not exist during object construction -- will let you know if the file currently exists and does an implicit Refresh. If FullName doesn't exist when the UnixFileSystemInfo is created, it will be checked for whenever information about the file system entry is required, such as with and .

Check the individual method and property documentation to determine if and when an exception will be thrown.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  A containing the name of the file system object to query.
  Creates a subclass.

  The argument is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see .

  is .

  is a zero-length string.

  -or-

  contains an invalid character. See .

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 Gets the number of file system blocks used by this file system entry. A containing the number of file system blocks used by this file system entry. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 Gets the preferred blocksize for filesystem I/O. A containing the preferred block size for file system I/O on this file system entry. doesn't exist.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Boolean `` A specifying what kind of access the process would like. Determines whether or not the process can access with the specified access A specifying whether or not the process can access .

  Note that this method is subject to external race conditions -- just because you can access now doesn't mean you'll be able to access it later, as another thread/process may change the access permissions.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.UnixFileSystemInfo `` Creates a hard link so that and are the same file. A instance which represents .

  The argument is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see .

  After creating the link, the link count will be incremented, and there will be no way to distinguish the two files -- they're the same file with two (or more) different names.

  The file system containing does not support hard links. []

  -or-

  The file is a directory or is flagged immutable or append-only (see ). []

  Search permission is denied for a component of the path or . []

  -or-

  requires writing in a directory with a mode that denies write permissions. []

  A component of the path prefix of or is not a directory. []

  A component of or that must exist does not exist. []

  -or-

  The file does not exist. []

  resides on a read-only file system. []

  -or-

  The directory for cannot be extended because there is no space left. []

  -or-

  An I/O error occurred while making the directory entry. []

  or was too long. []

  Too many symbolic links were encountered in translating or []

  -or-

  cannot be extended because the user's quota of disk blocks on the file system containing this directory has been exhausted. []

  -or-

  would exceed its limit. Use () to determine the maximum link value. []

  -or-

  already exists. []

  -or-

  and are on different file systems. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.UnixSymbolicLinkInfo `` A containing the name of the symbolic link to create. Create a symbolic link so that "points to" . A instance containing information about the created symbolic link.

  The argument is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see .

  The created symbolic link will contain the full path name, . If this is undesirable (for instance, you want the created symbolic link to contain relative path information), use instead. UnixSymbolicLinkInfo.CreateSymbolicLinkTo uses the exact path provided to the constructor when creating the symbolic link, while this method uses the fully-qualified file name to create the symbolic link.

  The ln(1) command:

  `ln -s target symlink`

  Can be created using in two ways. First, it can be created using :

  `UnixFileInfo f = new UnixFileInfo ("target.ufi"); f.CreateSymbolicLink ("symlink.ufi");`

  Second, it can be created using :

  `UnixSymbolicLinkInfo s = new UnixSymbolicLinkInfo ("symlink.usli"); s.CreateSymbolicLinkTo ("target.usli");`

  The links created by the above differ; in particular, the target of is the full path name of the target, while contains no extra information:

  `$ ls -lF symlink* | cut -c 39- symlink -> target symlink.ufi -> /full/path/to/target.ufi symlink.usli -> target.usli`

  Search permission is denied for a component of the path or . []

  A component of the path prefix of is not a directory. [] A component of that must exist does not exist. [] was too long. []

  resides on a read-only file system. []

  -or-

  The directory containing cannot be extended because there is no space left on the file system containing the directory. []

  -or-

  There are no free inodes on the file system on which the file is being created. []

  -or-

  An I/O error occurred while making the directory entry or allocating the inode. []

  Too many symbolic links were encountered in translating . []

  -or-

  The user's quota of inodes on the file system containing has been exhausted. []

  -or-

  The directory containing cannot be extended because the user's quota of disk blocks on the file system containing this directory has been exhausted. []

  -or-

  already exists.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void Deletes the file system entry .

  The filesystem containing does not support the removal of file system entries.

  -or-

  The directory containing has the bit set and the process's is neither the uid of the file to be deleted nor that of the directory containing it.

  Write access to the directory containing was not allowed for the processe's effective user id .

  -or-

  One of the directories in did not have search (execute) permissions.

  A component of is not a directory. does not exist.

  contains files other than '.' and '..' in it.

  -or-

  An I/O error occurred while deleting the file system entry or deallocating the inode.

  -or-

  The directory entry to be removed resides in a read-only file system.

  was too long.

  Too many symbolic links were encountered in translating .

  -or

  The directory to be removed is the mount point for a mounted filesystem.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 Gets the device ID that this file system entry resides on. A containing the device ID that this file system entry resides on. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 Gets the device type of this inode. A containing the type of this inode. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Returns a indicating whether the specified file system object exists.

  if the caller has the required permissions and contains the name of an existing file or directory; otherwise, . If is or a zero-length string, returns .

  If the caller does not have sufficient permissions to read the file system object , no exception is thrown and the method returns regardless of the existence of .

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.FileAccessPermissions Gets or sets the file system entry access permissions. A value which controls access to the file system entry.

  Access to file system objects (as represented by ) is controlled by the file system access permissions, . is a nine-bit field specifying read, write, and execute access for the owner, group, and everyone else (other).

  Access by the file's owner is controlled by the bits specified by ( & ). The owner permissions supersede group permissions and other permissions, even if the owner belongs to the group.

  Access by the file's owner group is controlled by the bits specified by ( & ). All group members get these access permissions. See also ..

  All other users (users who are not the file's owner nor belonging to the file's owner group) get the file access permissions specified by ( & ).

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.FileSpecialAttributes Gets or sets the file system entry special attributes. A value which contains the file special attributes to use.

  Callers may need to be the super user (often the root user) to change the file special attributes.

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.FileTypes Gets the type of this file system entry. A value specifying the type of this file system entry. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String Gets the fully-qualified path name. A containing the fully-qualified path name.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String Gets or sets the fully qualified path name. A containing the fully qualified path name.

  If is a different path, then the state is invalidated. This shouldn't matter, as the state will be re-validated on the next member access.

  It is possible for the object state to be inconsistent if is set but not . All methods in this class do not use OriginalPath but use FullPath; subclasses such as do use OriginalPath. If FullPath is set then OriginalPath should also be set if possible for consistency.

  is .

  is a zero-length string.

  -or-

  contains an invalid character. See .

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Int64 `` A value specifying which configuration value to retreive. Gets a configurable system limit or option variable associated with . A containing the value of the configuration variable . If there is no value for the configuration variable , then -1 is returned. The implementation does not support an association of with .

  Search permission is denied for a component of the path . []

  A component of the path prefix of is not a directory. [] A component of that must exist does not exist. [] was too long. [] An I/O error occurred while reading from or writing to the file system.

  Too many symbolic links were encountered in translating . []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` A containing the path to retrieve information about A which will contain information about . Gets file status information. A specifying whether was filled. If , then exists and contains valid information. Otherwise, is assumed to not exist and is assumed to contain invalid information.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.UnixFileSystemInfo `` To be added. To be added. To be added. To be added.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 Gets the inode of this file system entry. A containing the inode of this file system entry. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Is a ? A indicating whether or not is a .

  This is equivalent to comparing to .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Is a ? A indicating whether or not is a .

  This is equivalent to comparing to .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Is a ? A indicating whether or not is a .

  This is equivalent to comparing to .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Is a ? A indicating whether or not is a .

  This is equivalent to comparing to .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Is a ? A indicating whether or not is a .

  This is equivalent to comparing to .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Does include ? A indicating whether or not includes .

  This is equivalent to comparing with .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Does include ? A indicating whether or not includes .

  This is equivalent to comparing with .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Is a ? A indicating whether or not is a .

  This is equivalent to comparing to .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Does include ? A indicating whether or not includes .

  This is equivalent to comparing with .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean Is a ? A indicating whether or not is a .

  This is equivalent to comparing to .

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime Gets or sets the last file access time expressed in local time. The last access time of expressed in the local time. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime Gets or sets the last file access time expressed in coordinated universal time (UTC). The last access time of expressed in coordinated universal time (UTC). doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime Gets or sets the last status change time expressed in local time. The last status change time of expressed in the local time. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime Gets or sets the last status change time expressed in coordinated universal time (UTC). The last status change time of expressed in coordinated universal time (UTC). doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime Gets or sets the last file write time expressed in local time. The last write time of expressed in the local time. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime Gets or sets the last file write time expressed in coordinated universal time (UTC). The last write time of expressed in coordinated universal time (UTC). doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 Gets the file system entry size, in bytes. A containing the size of this file system entry, in bytes. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 Gets the current link count of this file system entry. A containing link count of this file system entry.

  A link count is the number of file system entries that share this .

  Use () to determine the maximum link count.

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String The file system entry name. A containing the file system entry name.

  This will generally be without the directory name.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String The original string passed to the constructor. A containing the original string passed to the constructor. It may contain relative path information without a qualifying directory, if that's what was originally provided to the constructor.

  This is primarily useful if you need relative path names instead of fully-qualified directory names, such as when dealing with symbolic links (with ).

  It is possible for the object state to be inconsistent if is set but not . All methods in this class do not use OriginalPath but use FullPath; subclasses such as do use OriginalPath. If FullPath is set then OriginalPath should also be set if possible for consistency.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.UnixGroupInfo Gets information about the owner group. A instance containing information about the owner group.

  This is identical to ().

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 Gets the owner group id. A containing the owner group id. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.UnixUserInfo Gets information about the owner user. A containing information about the owner user.

  This is identical to ().

  doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 Gets the owner user id. A containing the owner user id. doesn't exist.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  Mono.Unix.Native.FilePermissions Gets or sets the file system entry protection. A value containing the file system entry protection. doesn't exist.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void Refreshes the file system metadata presented.

  This method does not throw exceptions.

  Many properties and members will throw a if doesn't exist (that is, returns ).

  is checked during creation and on every property access until the file is found. Once found, the file will not be checked for until is invoked.

  Consequently, if the file system entry is removed (via or another process or some other means) or changed (written to, touch(1)'d, etc.), the information provided by this class will be stale and out of date.

  Use this method to refresh the information provided by this class.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` A containing the desired file size for Truncate or extend to be bytes in size.

  If is less than , the file will be extended as if by writing bytes with the value zero.

  If is greater than , then the extra data is lost.

  Search permission is denied for a component of the path . []

  -or-

  is not writable by the user. []

  -or-

  is a directory. []

  A component of the path prefix of is not a directory. [] A component of that must exist does not exist. []

  resides on a read-only file system. []

  -or-

  An I/O error occurred while making the directory entry or allocating the inode. []

  was too long. []

  Too many symbolic links were encountered in translating . []

  -or-

  is a pure procedure (shared text) file that is being executed and requests write access. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` A containing information about the new owner user and owner group. Set the owner user and owner group of .

  If this is called by the non-super user (usually the root user), then the and bits are cleared.

  Classes deriving from can change this method to operate on a different file. This default version will follow symbolic links, changing the permissions of the symbolic link target instead of the symbolic link itself. changes permissions on the symbolic link itself.

  This is (almost) equivalent to calling (.UserId, .GroupId).

  This is (almost) equivalent to calling (.UserId, .GroupId).

  The effective user ID does not match the owner of the file and the effective user ID is not the super-user. []

  Search permission is denied for a component of the path . []

  A component of the path prefix of is not a directory. [] A component of that must exist does not exist. []

  resides on a read-only file system. []

  -or-

  An I/O error occurred while making the directory entry or allocating the inode. []

  was too long. []

  Too many symbolic links were encountered in translating . []

  -or-

  An attempt was made to set the sticky bit upon an executable. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` A containing the user name to use for the new user-id and group-id. Set the owner user ID and owner group ID of .

  The user is looked up in the local password database and the resulting and are used as the new owner user id and owner group id for .

  If this is called by the non-super user (usually the root user), then the and bits are cleared.

  Classes deriving from can change this method to operate on a different file. This default version will follow symbolic links, changing the permissions of the symbolic link target instead of the symbolic link itself. changes permissions on the symbolic link itself.

  The effective user ID does not match the owner of the file and the effective user ID is not the super-user. []

  Search permission is denied for a component of the path . []

  A component of the path prefix of is not a directory. [] A component of that must exist does not exist. []

  resides on a read-only file system. []

  -or-

  An I/O error occurred while making the directory entry or allocating the inode. []

  was too long. []

  Too many symbolic links were encountered in translating . []

  -or-

  An attempt was made to set the sticky bit upon an executable. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A containing information about the new owner user. If , the owner user id is unchanged. A containing information about the new owner group. If , the owner group id is unchanged. Set the owner user and owner group of .

  If this is called by the non-super user (usually the root user), then the and bits are cleared.

  Classes deriving from can change this method to operate on a different file. This default version will follow symbolic links, changing the permissions of the symbolic link target instead of the symbolic link itself. changes permissions on the symbolic link itself.

  This is (almost) equivalent to calling (.UserId, .GroupId).

  The effective user ID does not match the owner of the file and the effective user ID is not the super-user. []

  Search permission is denied for a component of the path . []

  A component of the path prefix of is not a directory. [] A component of that must exist does not exist. []

  resides on a read-only file system. []

  -or-

  An I/O error occurred while making the directory entry or allocating the inode. []

  was too long. []

  Too many symbolic links were encountered in translating . []

  -or-

  An attempt was made to set the sticky bit upon an executable. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A containing the user id of the new owner user. If -1, the owner user id is unchanged. A containing the group id of the new owner group. If -1, the owner group id is unchanged. Set the owner user ID and owner group ID of .

  If this is called by the non-super user (usually the root user), then the and bits are cleared.

  Classes deriving from can change this method to operate on a different file. This default version will follow symbolic links, changing the permissions of the symbolic link target instead of the symbolic link itself. changes permissions on the symbolic link itself.

  The effective user ID does not match the owner of the file and the effective user ID is not the super-user. []

  Search permission is denied for a component of the path . []

  A component of the path prefix of is not a directory. [] A component of that must exist does not exist. []

  resides on a read-only file system. []

  -or-

  An I/O error occurred while making the directory entry or allocating the inode. []

  was too long. []

  Too many symbolic links were encountered in translating . []

  -or-

  An attempt was made to set the sticky bit upon an executable. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` A containing the user name of the owner user id to use. A containing the group name of the owner group id to use. Set the owner user ID and owner group ID of .

  If this is called by the non-super user (usually the root user), then the and bits are cleared.

  Classes deriving from can change this method to operate on a different file. This default version will follow symbolic links, changing the permissions of the symbolic link target instead of the symbolic link itself. changes permissions on the symbolic link itself.

  The effective user ID does not match the owner of the file and the effective user ID is not the super-user. []

  Search permission is denied for a component of the path . []

  A component of the path prefix of is not a directory. [] A component of that must exist does not exist. []

  resides on a read-only file system. []

  -or-

  An I/O error occurred while making the directory entry or allocating the inode. []

  was too long. []

  Too many symbolic links were encountered in translating . []

  -or-

  An attempt was made to set the sticky bit upon an executable. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.Native.Stat Converts the instance into a intance. A which contains information about . doesn't exist.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Boolean `` `` To be added. To be added. To be added. To be added. To be added.