Beagrep.Util.FileSystem.Exists C# (CSharp) Метод

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

public static Exists ( string path ) : bool
path string
Результат bool
        public static bool Exists(string path)
        {
            return File.Exists (path) || Directory.Exists (path);
        }

Usage Example

Пример #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()));
            }
        }
All Usage Examples Of Beagrep.Util.FileSystem::Exists