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. Mono.Unix.UnixFileSystemInfo Provides information about and performs operations on symbolic links.

The class provides information about a symbolic link. It also allows basic symbolic link manipulation:

Symbolic link creation with .
Symbolic link deletion with .
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  A containing the symbolic link to query.
  Creates a new instance containing information about the 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 .

  It is valid to construct objects for symbolic links that do not exist or for files and directories. However, attempts to use the instance may generate s and other exception types. Use to see if exists, to ensure that is a symbolic link, and Use to ensure that the symbolic link target is valid.

  is .
  contains invalid characters; see .
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Use GetContents()")
  Mono.Unix.UnixFileSystemInfo Gets the target of this symbolic link.

  A reference containing information about the target of this symbolic link, or if :

  does not exist, or
  is not a symbolic link.

  The behavior will be changed in the future to generate an exception for either of the above error conditions, so current code needs to deal with both exceptions and a return value. will not be used by the Mono 1.2 release.

  Do not use this method, as it always creates a new instance -- no caching is performed, even though it's a property. Instead, use ,

  This really should throw the same exceptions as instead of returning .

  The target may in turn be a symbolic link (nothing prevents symbolic links from referencing other symbolic links). To get the actual target, use , , or walk the symbolic link "chain": `UnixFileSystemInfo target = new UnixSymbolicLinkInfo ("symlink").Contents; while (target != null && target.FileType == FileTypes.SymbolicLink) { target = ((UnixSymbolicLinkInfo) target).Contents; }`

  is not a symbolic link. []

  A component of is not a directory. []

  []

  An I/O error occurred while reading from the file system. []

  A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. []

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

  -or-

  Too many symbolic links were encountered in translating the pathname. []

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String Gets the target of this symbolic link as a . A containing the target of this symbolic link.

  The target may in turn be a symbolic link (nothing prevents symbolic links from referencing other symbolic links). To get the actual target, use or .

  is not a symbolic link. []

  A component of is not a directory. []

  []

  An I/O error occurred while reading from the file system. []

  A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. []

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

  -or-

  Too many symbolic links were encountered in translating the pathname. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` A instance containing the target of this symbolic link instance. Creates the symbolic link which refers to the symbolic link target .

  Creates the symbolic link which refers to the target .

  The argument is permitted to specify relative or absolute path information. Relative path information is interpreted by the file system as relative to the symbolic link .

  Using instead of allows relative path information to be preserved within 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`

  A component of is not a directory. []

  does not exist. []

  An I/O error occurred while making the directory entry for or allocating the inode for or writing out the link contents of . []

  -or-

  The file would reside on a read-only file system. []

  -or-

  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. []

  -or-

  The new symbolic link cannot be created because there is no space left on the file system that will contain the symbolic link. []

  -or-

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

  -or-

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

  A component of either pathname exceeded 255 characters, or the entire length of either path name exceeded 1023 characters. []

  A component of denies search permission. []

  -or-

  Too many symbolic links were encountered in translating the pathname. []

  -or-

  The path name pointed at by the argument already exists. []

  -or-

  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. []

  -or-

  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. []

  -or-

  The user's quota of inodes on the file system on which the symbolic link is being created has been exhausted. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` A containing the target of this symbolic link instance. Creates the symbolic link which refers to the symbolic link target .

  Creates the symbolic link which refers to the target .

  The argument is permitted to specify relative or absolute path information. Relative path information is interpreted by the file system as relative to the symbolic link .

  Using instead of allows relative path information to be preserved within 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`

  A component of is not a directory. []

  does not exist. []

  An I/O error occurred while making the directory entry for or allocating the inode for or writing out the link contents of . []

  -or-

  The file would reside on a read-only file system. []

  -or-

  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. []

  -or-

  The new symbolic link cannot be created because there is no space left on the file system that will contain the symbolic link. []

  -or-

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

  -or-

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

  A component of either pathname exceeded 255 characters, or the entire length of either path name exceeded 1023 characters. []

  A component of denies search permission. []

  -or-

  Too many symbolic links were encountered in translating the pathname. []

  -or-

  The path name pointed at by the argument already exists. []

  -or-

  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. []

  -or-

  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. []

  -or-

  The user's quota of inodes on the file system on which the symbolic link is being created has been exhausted. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  Mono.Unix.UnixFileSystemInfo Gets the target of this symbolic link.

  A reference containing information about the target of this symbolic link, or if :

  does not exist, or
  is not a symbolic link.

  The behavior will be changed in the future to generate an exception for either of the above error conditions, so current code needs to deal with both exceptions and a return value. will not be used by the Mono 1.2 release.

  This really should throw the same exceptions as instead of returning .

  The target may in turn be a symbolic link (nothing prevents symbolic links from referencing other symbolic links). To get the actual target, use , , or walk the symbolic link "chain": `UnixFileSystemInfo target = new UnixSymbolicLinkInfo ("symlink").GetContents (); while (target != null && target.FileType == FileTypes.SymbolicLink) { target = ((UnixSymbolicLinkInfo) target).GetContents (); }`

  is not a symbolic link. []

  A component of is not a directory. []

  []

  An I/O error occurred while reading from the file system. []

  A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. []

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

  -or-

  Too many symbolic links were encountered in translating the pathname. []

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean `` `` To be added. 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.Boolean Returns a indicating whether or not , and are valid. if , and are valid (i.e. won't return or generate an exception); otherwise, .

  This method is subject to race conditions in the file system -- it's entirely possible for the symlink to be modified or deleted between a call to and , , or .

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added. To be added. To be added. To be added.