コード例 #1
0
ファイル: Cache.cs プロジェクト: xiechaoyi/dokan-sshfs
        public NtStatus SetFileAttributes(string filename, FileAttributes attr, DokanFileInfo info)
        {
            CacheEntry entry = cache_.Lookup(filename);

            entry.RemoveGetFileInfoCache();

            return(ope_.SetFileAttributes(filename, attr, info));
        }
コード例 #2
0
ファイル: Proxy.cs プロジェクト: zmshan2008/MediaPortal-2
        ////

        internal NtStatus SetFileAttributesProxy(string rawFileName, uint rawAttributes, DokanFileInfo rawFileInfo)
        {
            try
            {
                NtStatus result = _operations.SetFileAttributes(rawFileName, (FileAttributes)rawAttributes, rawFileInfo);
                return(result);
            }
            catch (Exception ex)
            {
                ServiceRegistration.Get <ILogger>().Warn("Dokan exception: ", ex);
                return(DokanResult.InvalidParameter);
            }
        }
コード例 #3
0
        public int SetFileAttributesProxy(IntPtr rawFileName, uint rawAttributes, ref DOKAN_FILE_INFO rawFileInfo)
        {
            try
            {
                string file = GetFileName(rawFileName);

                FileAttributes attr = (FileAttributes)rawAttributes;
                return(operations.SetFileAttributes(file, attr, ConvertFileInfo(ref rawFileInfo)));
            }
            catch (Exception ex)
            {
                Log.ErrorException("SetFileAttributesProxy threw: ", ex);
                return(-1);
            }
        }
コード例 #4
0
        ////

        public int SetFileAttributesProxy(string rawFileName, uint rawAttributes,
                                          DokanFileInfo rawFileInfo)
        {
            try
            {
                return((int)_operations.SetFileAttributes(rawFileName, (FileAttributes)rawAttributes, rawFileInfo));
            }
            catch
            {
#if DEBUG
                throw;
#endif
                return(ERROR_INVALID_FUNCTION);
            }
        }
コード例 #5
0
        ////

        public NtStatus SetFileAttributesProxy(string rawFileName,
                                               uint rawAttributes,
                                               DokanFileInfo rawFileInfo)
        {
            try
            {
                logger.Debug("SetFileAttributesProxy : {0}", rawFileName);
                logger.Debug("\tAttributes\t{0}", (FileAttributes)rawAttributes);
                logger.Debug("\tContext\t{0}", rawFileInfo);

                var result = operations.SetFileAttributes(rawFileName, (FileAttributes)rawAttributes, rawFileInfo);

                logger.Debug("SetFileAttributesProxy : {0} Return : {1}", rawFileName, result);
                return(result);
            }
            catch (Exception ex)
            {
                logger.Error("SetFileAttributesProxy : {0} Throw : {1}", rawFileName, ex.Message);
                return(DokanResult.InvalidParameter);
            }
        }
コード例 #6
0
        ////

        public NtStatus SetFileAttributesProxy(string rawFileName,
                                               uint rawAttributes,
                                               DokanFileInfo rawFileInfo)
        {
            try
            {
                Trace("\nSetFileAttributesProxy : " + rawFileName);
                Trace("\tAttributes\t" + (FileAttributes)rawAttributes);
                Trace("\tContext\t" + ToTrace(rawFileInfo));

                NtStatus result = operations.SetFileAttributes(rawFileName, (FileAttributes)rawAttributes, rawFileInfo);

                Trace("SetFileAttributesProxy : " + rawFileName + " Return : " + result);
                return(result);
            }
#pragma warning disable 0168
            catch (Exception ex)
#pragma warning restore 0168
            {
                Trace("SetFileAttributesProxy : " + rawFileName + " Throw : " + ex.Message);
                return(DokanResult.InvalidParameter);
            }
        }