Exists() публичный статический Метод

public static Exists ( string path ) : bool
path string
Результат bool
Пример #1
0
        // Set a non-beagrep attribute
        private static void Set(string path, string name, string value)
        {
            if (!FileSystem.Exists(path))
            {
                throw new IOException(path);
            }

            byte[] buffer = encoding.GetBytes(value);
            int    retval = Syscall.lsetxattr(path, name, buffer);

            if (retval == -1)
            {
                throw new IOException("Could not set extended attribute on " + path + ": " + Mono.Unix.Native.Stdlib.strerror(Mono.Unix.Native.Stdlib.GetLastError()));
            }
        }
Пример #2
0
        // Get a non-beagrep attribute
        public static string Get(string path, string name)
        {
            if (!FileSystem.Exists(path))
            {
                throw new IOException(path);
            }

            long size = Syscall.lgetxattr(path, name, xa_buffer);

            if (size <= 0)
            {
                return(null);
            }
            return(encoding.GetString(xa_buffer));
        }