Esempio n. 1
0
		static void PopulateChildFiles(IFile parent, IContainer child)
		{
			FCS.Lite.Interface.File newChild = new FCS.Lite.Interface.File(child.FileName, child.DisplayName, child.ContentId);

			parent.Add(newChild);

			foreach (IContainer ic in child.Files)
			{
				PopulateChildFiles(newChild, ic);
			}
		}
Esempio n. 2
0
        protected FileType ValidateFileType(string sourceFilePath)
        {
            using (Workshare.FCS.Lite.Interface.File fcsFile = new FCS.Lite.Interface.File(sourceFilePath, new FileInfo(sourceFilePath).Name))
            {
                if (IsFileTypeValid(fcsFile.FileType))
                    return fcsFile.FileType;

                throw new InvalidDataException("The file is not of a supported type");            
            }
        }