コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FileBinaryResource"/> class.
        /// </summary>
        /// <param name="filePath">The file path.</param>
        public FileBinaryResource(UPath filePath)
        {
            VxArgs.NotNull(filePath, nameof(filePath));

            _fullFilePath = filePath.Normalize().ToPlatformPath();

            if (!filePath.FileExists())
            {
                string platformFilePath = filePath.ToPlatformPath();
                throw new FileNotFoundException($"{platformFilePath} does not exists.", platformFilePath);
            }
        }