/// <summary>
        /// Converts a passed FileItem into a file information structure. Exceptions can be thrown.
        /// </summary>
        /// <param name="vItem"></param>
        /// <returns></returns>
        public static FuserFileInformation convertFileInformation(IFuserFilesystemItem vItem)
        {
            FuserFileInformation fileInfo = new FuserFileInformation();

            convertFileInformation(vItem, fileInfo);
            return(fileInfo);
        }
        public Win32Returncode GetFileInformation(FuserFileHandler hFile, FuserFileInformation fileinfo)
        {
            string funcname = "GetFileInformation";
            string param    = "";

            try {
                //param = ;
                Win32Returncode r = sourceSystem.GetFileInformation(hFile, fileinfo);

                LogEvent(funcname, r, param, hFile);
                return(r);
            } catch (Exception e) {
                LogEvent(funcname, Win32Returncode.DEFAULT_UNKNOWN_ERROR, param, hFile);
                LogException(funcname, e);
                return(Win32Returncode.DEFAULT_UNKNOWN_ERROR);
            }
        }
        /// <summary>
        /// Converts a passed FileItem into a file information structure. Exceptions can be thrown.
        /// </summary>
        /// <param name="FuserFileItem"></param>
        /// <returns></returns>
        public static void convertFileInformation(IFuserFilesystemItem vItem, FuserFileInformation overwriteFileInfo)
        {
            lock (vItem) {
                overwriteFileInfo.Filename       = vItem.Name;
                overwriteFileInfo.CreationTime   = vItem.CreationTime;
                overwriteFileInfo.LastAccessTime = vItem.LastAccessTime;
                overwriteFileInfo.LastWriteTime  = vItem.LastWriteTime;

                overwriteFileInfo.Attributes = 0;
                if (vItem.isArchive)
                {
                    overwriteFileInfo.Attributes |= FileAttributes.Archive;
                }
                if (vItem.isReadOnly)
                {
                    overwriteFileInfo.Attributes |= FileAttributes.ReadOnly;
                }
                if (vItem.isHidden)
                {
                    overwriteFileInfo.Attributes |= FileAttributes.Hidden;
                }
                if (vItem.isSystem)
                {
                    overwriteFileInfo.Attributes |= FileAttributes.System;
                }


                if (vItem is IFuserFilesystemDirectory)
                {
                    overwriteFileInfo.Attributes |= FileAttributes.Directory;
                    overwriteFileInfo.Length      = 0;
                }
                else
                {
                    if (overwriteFileInfo.Attributes == 0)
                    {
                        overwriteFileInfo.Attributes = FileAttributes.Normal;
                    }

                    IFuserFilesystemFile file = (IFuserFilesystemFile)vItem;
                    overwriteFileInfo.Length = file.Length;
                }
            }
        }
 public Win32Returncode GetFileInformation(FuserFileHandler hFile, FuserFileInformation fileinfo)
 {
     lock (this) {
         return(this.sourceSystem.GetFileInformation(hFile, fileinfo));
     }
 }