Exemplo n.º 1
0
        public DokanError SetFileAttributes(string fileName, FileAttributes attributes, DokanFileInfo info)
        {
            //Console.WriteLine("SetFileAttribute: {0}", fileName);

            Directory dir = new Directory(Util.GetPathDirectory(fileName));
            if (!dir.Exists())
            {
                return DokanError.ErrorPathNotFound;
            }
            String name = Util.GetPathFileName(fileName);
            if (!dir.Contains(name))
            {
                return DokanError.ErrorFileNotFound;
            }
            dir.SetFileAttribute(name, attributes);

            return DokanError.ErrorSuccess;
        }