Beispiel #1
0
        /// <summary>
        /// Ensures the file can actually be written to the path and will return the full path as string
        /// </summary>
        /// <param name="folder">The name of the folder</param>
        /// <param name="fullName">The name of the file</param>
        /// <returns>Full path of the file location</returns>
        private string FileChecks(string folder, string fullName)
        {
            try
            {
                FileStore.EnsureFolderExists(folder);
            }
            catch (Exception ex)
            {
                Mvx.IoCProvider.Resolve <IMvxLog>().ErrorException("ExStorageService.FileChecks", ex);
            }

            var fullPath = FileStore.PathCombine(folder, fullName);

            if (FileStore.Exists(fullPath))
            {
                DeleteFile(folder, fullName);
            }
            return(fullPath);
        }