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

            entry.RemoveGetFileInfoCache();

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

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

                return(operations.SetAllocationSize(file, rawLength, ConvertFileInfo(ref rawFileInfo)));
            }
            catch (Exception ex)
            {
                Log.ErrorException("SetAllocationSizeProxy threw: ", ex);
                return(-1);
            }
        }
コード例 #4
0
        public int SetAllocationSizeProxy(string rawFileName, long rawLength,
                                          DokanFileInfo rawFileInfo)
        {
            try
            {
                return((int)_operations.SetAllocationSize(rawFileName, rawLength, rawFileInfo));
            }
            catch
            {
#if DEBUG
                throw;
#endif
                return(ERROR_INVALID_FUNCTION);
            }
        }
コード例 #5
0
        public NtStatus SetAllocationSizeProxy(string rawFileName, long rawLength,
                                               DokanFileInfo rawFileInfo)
        {
            try
            {
                logger.Debug("SetAllocationSizeProxy : {0}", rawFileName);
                logger.Debug("\tLength\t{0}", rawLength);
                logger.Debug("\tContext\t{0}", rawFileInfo);

                var result = operations.SetAllocationSize(rawFileName, rawLength, rawFileInfo);

                logger.Debug("SetAllocationSizeProxy : {0} Return : {1}", rawFileName, result);
                return(result);
            }
            catch (Exception ex)
            {
                logger.Error("SetAllocationSizeProxy : {0} Throw : {1}", rawFileName, ex.Message);
                return(DokanResult.InvalidParameter);
            }
        }
コード例 #6
0
        public NtStatus SetAllocationSizeProxy(string rawFileName, long rawLength,
                                               DokanFileInfo rawFileInfo)
        {
            try
            {
                Trace("\nSetAllocationSizeProxy : " + rawFileName);
                Trace("\tLength\t" + rawLength);
                Trace("\tContext\t" + ToTrace(rawFileInfo));

                NtStatus result = operations.SetAllocationSize(rawFileName, rawLength, rawFileInfo);

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