public static void CreateNewFile(IFileStorageProviderDataProvider dataProvider, Guid physicalFileID, string extensionName) { IFileStorageProvider provider = FileStorageProviderFactory.CreateFileStorageProvider(dataProvider, CurrentConfigSetting, physicalFileID, extensionName); if (provider != null) { try { provider.SetLength(0); } finally { provider.Close(); } } }
public static void SetFileLength(IFileStorageProviderDataProvider dataProvider, Guid physicalFileID, string extensionName, long length) { IFileStorageProvider provider = FileStorageProviderFactory.CreateFileStorageProvider(dataProvider, physicalFileID, extensionName); if (provider != null) { try { provider.SetLength(length); } finally { provider.Close(); } } }