Azavea.NijPredictivePolicing.ACSAlchemistLibrary.FileLocator.GetStateBlockGroupDataFilePath C# (CSharp) Method

GetStateBlockGroupDataFilePath() public static method

Gets the local path of the zip file containing all the raw blockgroup/tract data
public static GetStateBlockGroupDataFilePath ( AcsState state ) : string
state AcsState
return string
        public static string GetStateBlockGroupDataFilePath(AcsState state)
        {
            string basePath = FileUtilities.PathEnsure(Settings.AppDataDirectory, Settings.CurrentAcsDirectory);
            return Path.Combine(basePath, state.ToString() + Settings.DataFileTypeExtension);
        }

Usage Example

Beispiel #1
0
        /// <summary>
        /// Returns the path to the directory where the raw data files for a given should be extracted/read from
        /// </summary>
        /// <param name="state"></param>
        /// <returns></returns>
        public static string GetStateBlockGroupDataDir(AcsState state)
        {
            string filePath = FileLocator.GetStateBlockGroupDataFilePath(state);
            string basePath = Path.GetDirectoryName(filePath);

            //IMPORTANT!  Don't create this directory on disk, just the path string!
            return(FileUtilities.PathCombine(basePath, state.ToString()));
        }