예제 #1
0
파일: FSDrive.cs 프로젝트: WishSummer/FS
        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;
        }